Merge pull request #5683 from jwinzer/bug-fix-perms

Fix unresolved permissions
This commit is contained in:
Sean 2020-12-09 12:54:22 +01:00 committed by GitHub
commit 78cfa4875e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -263,7 +263,7 @@
<mat-divider <mat-divider
*ngIf="(categories.length || motionBlocks.length || hasAmendments() || perms.isAllowed('manage')) *ngIf="(categories.length || motionBlocks.length || hasAmendments() || perms.isAllowed('manage'))
&& (perms.isAllowed('manage') || selectedView === 'list' || operator.hasPerms('core.can_manage_config'))" && (perms.isAllowed('manage') || selectedView === 'list' || perms.isAllowed('can_manage_config'))"
></mat-divider> ></mat-divider>
<div *ngIf="perms.isAllowed('manage')"> <div *ngIf="perms.isAllowed('manage')">

View File

@ -166,6 +166,9 @@ export class LocalPermissionsService {
this.operator.hasPerms(Permission.motionsCanManageMetadata) this.operator.hasPerms(Permission.motionsCanManageMetadata)
); );
} }
case 'can_manage_config': {
return this.operator.hasPerms(Permission.coreCanManageConfig);
}
case 'manage': { case 'manage': {
return this.operator.hasPerms(Permission.motionsCanManage); return this.operator.hasPerms(Permission.motionsCanManage);
} }

View File

@ -50,7 +50,7 @@
</mat-icon> </mat-icon>
<mat-icon <mat-icon
matTooltip="{{ 'Inactive' | translate }}" matTooltip="{{ 'Inactive' | translate }}"
*ngIf="!user.is_active && this.operator.hasPerms('users.see_extra')" *ngIf="!user.is_active && canSeeExtra"
> >
block block
</mat-icon> </mat-icon>

View File

@ -118,6 +118,10 @@ export class UserListComponent extends BaseListViewComponent<ViewUser> implement
return this.operator.hasPerms(Permission.usersCanManage); return this.operator.hasPerms(Permission.usersCanManage);
} }
public get canSeeExtra(): boolean {
return this.operator.hasPerms(Permission.usersCanSeeExtraData);
}
public get showVoteWeight(): boolean { public get showVoteWeight(): boolean {
return this.pollService.isElectronicVotingEnabled && this.isVoteWeightActive; return this.pollService.isElectronicVotingEnabled && this.isVoteWeightActive;
} }