X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fmoderation%2Fuser-moderation-dropdown.component.ts;h=e9d4c1437ee79ade5140a84a9a5870c0842a2aaa;hb=dd4f25eea802fd88ea641d730432b56f562e0861;hp=9a2461ebf3f2db695c15b458e37f8f4bb04d287d;hpb=f8b2c1b4f509c037b9650cca2c5befd21f056df3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts index 9a2461ebf..e9d4c1437 100644 --- a/client/src/app/shared/moderation/user-moderation-dropdown.component.ts +++ b/client/src/app/shared/moderation/user-moderation-dropdown.component.ts @@ -10,11 +10,10 @@ import { BlocklistService } from '@app/shared/blocklist' @Component({ selector: 'my-user-moderation-dropdown', - templateUrl: './user-moderation-dropdown.component.html', - styleUrls: [ './user-moderation-dropdown.component.scss' ] + templateUrl: './user-moderation-dropdown.component.html' }) export class UserModerationDropdownComponent implements OnChanges { - @ViewChild('userBanModal') userBanModal: UserBanModalComponent + @ViewChild('userBanModal', { static: false }) userBanModal: UserBanModalComponent @Input() user: User @Input() account: Account @@ -34,6 +33,7 @@ export class UserModerationDropdownComponent implements OnChanges { private serverService: ServerService, private userService: UserService, private blocklistService: BlocklistService, + private auth: AuthService, private i18n: I18n ) { } @@ -231,7 +231,7 @@ export class UserModerationDropdownComponent implements OnChanges { if (this.user && authUser.id === this.user.id) return - if (this.user && authUser.hasRight(UserRight.MANAGE_USERS)) { + if (this.user && authUser.hasRight(UserRight.MANAGE_USERS) && authUser.canManage(this.user)) { this.userActions.push([ { label: this.i18n('Edit'),