diff --git a/client/src/app/shared/components/sorting-list/sorting-list.component.ts b/client/src/app/shared/components/sorting-list/sorting-list.component.ts
index ba453fa4f..42ec97ec7 100644
--- a/client/src/app/shared/components/sorting-list/sorting-list.component.ts
+++ b/client/src/app/shared/components/sorting-list/sorting-list.component.ts
@@ -59,6 +59,12 @@ export class SortingListComponent implements OnInit, OnDestroy {
@Input()
public count = false;
+ /**
+ * Can be set to false to disable drag n drop
+ */
+ @Input()
+ public enable = true;
+
/**
* The Input List Values
*
diff --git a/client/src/app/shared/directives/perms.directive.ts b/client/src/app/shared/directives/perms.directive.ts
index 8ee3f8cef..2001fcaff 100644
--- a/client/src/app/shared/directives/perms.directive.ts
+++ b/client/src/app/shared/directives/perms.directive.ts
@@ -47,6 +47,12 @@ export class PermsDirective implements OnInit, OnDestroy {
*/
private complement: boolean;
+ /**
+ * Add a true-false-condition additional to osPerms
+ * `*osPerms="'motions.can_manage';and:isRecoMode(ChangeRecoMode.Final)"`
+ */
+ private and = true;
+
private operatorSubscription: Subscription | null;
/**
@@ -110,6 +116,16 @@ export class PermsDirective implements OnInit, OnDestroy {
this.updateView();
}
+ /**
+ * Comes from the view.
+ * `;and:` turns into osPermsAnd during runtime.
+ */
+ @Input('osPermsAnd')
+ public set osPermsAnd(value: boolean) {
+ this.and = value;
+ this.updateView();
+ }
+
/**
* Shows or hides certain content in the view.
*/
@@ -133,7 +149,10 @@ export class PermsDirective implements OnInit, OnDestroy {
* Returns true if the users permissions fit.
*/
private checkPermissions(): boolean {
- const hasPerms = this.permissions.length === 0 || this.operator.hasPerms(...this.permissions);
+ const hasPerms = this.and
+ ? this.permissions.length === 0 || this.operator.hasPerms(...this.permissions)
+ : false;
+
if (this.complement) {
return !hasPerms;
} else {
diff --git a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.html b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.html
index cf3a3008f..4857ec021 100644
--- a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.html
+++ b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.html
@@ -60,7 +60,13 @@
0">
-
+
diff --git a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts
index f4857d044..6097af445 100644
--- a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts
+++ b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.ts
@@ -176,6 +176,10 @@ export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit
});
}
+ public opCanManage(): boolean {
+ return this.op.hasPerms('agenda.can_manage_list_of_speakers');
+ }
+
/**
* Check the URL to determine a current list of Speakers
*/
diff --git a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html
index e20222143..b9bda26c2 100644
--- a/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html
+++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html
@@ -495,7 +495,7 @@
type="button"
mat-icon-button
matTooltip="{{ 'Create final print template' | translate }}"
- *ngIf="isRecoMode(ChangeRecoMode.Final)"
+ *osPerms="'motions.can_manage';and:isRecoMode(ChangeRecoMode.Final)"
(click)="createModifiedFinalVersion()"
>
description
@@ -878,7 +878,7 @@