@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
private serverService: ServerService,
private userService: UserService,
private blocklistService: BlocklistService,
+ private auth: AuthService,
private i18n: I18n
) { }
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'),