Merge pull request #4483 from tsiegleauq/motion-block-perms
Motion block permission fixes
This commit is contained in:
commit
a26c44ca73
@ -45,7 +45,9 @@
|
||||
<!-- title column -->
|
||||
<ng-container matColumnDef="title">
|
||||
<mat-header-cell *matHeaderCellDef mat-sort-header> <span translate>Motion</span> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let motion" (click)="onClickMotionTitle(motion)"> {{ motion.title }} </mat-cell>
|
||||
<mat-cell *matCellDef="let motion" (click)="onClickMotionTitle(motion)">
|
||||
{{ motion.getTitle() }}
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<!-- state column -->
|
||||
|
@ -122,10 +122,13 @@ export class MotionBlockListComponent extends ListViewBaseComponent<ViewMotionBl
|
||||
* @returns an array of strings building the column definition
|
||||
*/
|
||||
public getColumnDefinition(): string[] {
|
||||
let columns = ['title', 'amount', 'menu'];
|
||||
let columns = ['title', 'amount'];
|
||||
if (this.operator.hasPerms('core.can_manage_projector')) {
|
||||
columns = ['projector'].concat(columns);
|
||||
}
|
||||
if (this.operator.hasPerms('motions.can_manage')) {
|
||||
columns = columns.concat(['menu']);
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
|
@ -165,10 +165,14 @@
|
||||
<mat-icon>device_hub</mat-icon>
|
||||
<span translate>Categories</span>
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="perms.isAllowed('manage') || motionBlocks.length">
|
||||
<button mat-menu-item routerLink="blocks">
|
||||
<mat-icon>widgets</mat-icon>
|
||||
<span translate>Motion blocks</span>
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="perms.isAllowed('manage')">
|
||||
<button mat-menu-item routerLink="statute-paragraphs" *ngIf="statutesEnabled">
|
||||
<mat-icon>account_balance</mat-icon>
|
||||
<span translate>Statute</span>
|
||||
|
Loading…
Reference in New Issue
Block a user