Skip to content

Commit

Permalink
Merge staging into master
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 11, 2023
2 parents 84fd874 + d6160a1 commit 3555dd2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/abilities/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class User extends Ability {
}

get canShowOwn() {
return this.session.isAuthenticated;
return this.session.isAuthenticated && this.session.currentUser?.id;
}

get canCreate() {
Expand Down
2 changes: 1 addition & 1 deletion app/components/menu-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div class='profile-menu {{if layoutManager.profileMenuOpen "open"}}'>
<MenuSidebarItem
@link='users.user'
@hasPermission={{can 'show individual users'}}
@hasPermission={{can 'show own users'}}
@icon='user'
@title={{t 'mixin.menuItems.profile'}}
@minor={{true}}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class ProfileRoute extends AuthenticatedRoute {
@service router;

canAccess() {
return this.abilities.can('show individual users');
return this.abilities.can('show own users');
}

redirect() {
Expand Down

0 comments on commit 3555dd2

Please sign in to comment.