Staff promotions: you can't change your own permission groups

This commit is contained in:
Alex Gleason 2021-07-13 12:39:53 -05:00
parent b892c6fe22
commit 484a27ef2f
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ class Header extends ImmutablePureComponent {
menu.push({ text: intl.formatMessage(messages.admin_account, { name: account.get('username') }), href: `/pleroma/admin/#/users/${account.get('id')}/`, newTab: true });
}
if (isLocal(account)) {
if (account.get('id') !== me && isLocal(account)) {
if (isAdmin(account)) {
menu.push({ text: intl.formatMessage(messages.demoteToModerator, { name: account.get('username') }), action: this.props.onPromoteToModerator });
menu.push({ text: intl.formatMessage(messages.demoteToUser, { name: account.get('username') }), action: this.props.onDemoteToUser });