diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html index 1cf555806..7331a681a 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.html @@ -222,12 +222,14 @@ - - +
+ + +
-
+
{{ stateLabel }} @@ -238,7 +240,7 @@
-
+
{{ stateLabel }}
diff --git a/client/src/app/site/motions/services/local-permissions.service.ts b/client/src/app/site/motions/services/local-permissions.service.ts index 078c10381..e6d1cbacb 100644 --- a/client/src/app/site/motions/services/local-permissions.service.ts +++ b/client/src/app/site/motions/services/local-permissions.service.ts @@ -108,6 +108,20 @@ export class LocalPermissionsService { motion.state.allow_submitter_edit && motion.submitters.some(submitter => submitter.id === this.operator.user.id) ); + case 'change_state': + // check also for empty ViewMotion object (e.g. if motion.id is null) + // important for creating new motion as normal user + if (!motion || !motion.id) { + return false; + } + return ( + this.operator.hasPerms('motions.can_manage') || + this.operator.hasPerms('motions.can_manage_metadata') || + (motion.state && + motion.state.allow_submitter_edit && + motion.submitters && + motion.submitters.some(submitter => submitter.id === this.operator.user.id)) + ); case 'change_metadata': return ( this.operator.hasPerms('motions.can_manage') ||