2019-10-24 23:00:59 -04:00
|
|
|
import { registerUnbound } from "discourse-common/lib/helpers";
|
2020-05-28 11:32:57 -04:00
|
|
|
import User from "discourse/models/user";
|
2019-10-24 22:23:32 -04:00
|
|
|
|
2020-09-16 10:53:50 -04:00
|
|
|
export default registerUnbound("user-viewing-self", function (model) {
|
2020-05-28 11:32:57 -04:00
|
|
|
if (User.current()) {
|
2019-10-24 23:00:59 -04:00
|
|
|
return (
|
2020-05-28 11:32:57 -04:00
|
|
|
User.current().username.toLowerCase() === model.username.toLowerCase()
|
2019-10-24 23:00:59 -04:00
|
|
|
);
|
2019-10-24 22:23:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|