From db672f1405b836212fc55d87e5d9706e8ca4a5d2 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Thu, 27 Jun 2019 16:20:31 +0200 Subject: [PATCH] Remove restrictions for filters Removes the restictions for filters --- .../site/motions/services/motion-filter-list.service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/motions/services/motion-filter-list.service.ts b/client/src/app/site/motions/services/motion-filter-list.service.ts index c4ad3bb06..932c7b390 100644 --- a/client/src/app/site/motions/services/motion-filter-list.service.ts +++ b/client/src/app/site/motions/services/motion-filter-list.service.ts @@ -212,10 +212,9 @@ export class MotionFilterListService extends BaseFilterListService { }); for (const state of workflow.states) { - if ( - this.operator.hasPerms('motions.can_manage', 'motions.can_manage_metadata') && - state.restriction - ) { + // get the restriction array, but remove the is_submitter condition, if present + const restrictions = state.restriction.filter(r => r !== 'is_submitter'); + if (!restrictions.length || this.operator.hasPerms(...restrictions)) { // sort final and non final states state.isFinalState ? finalStates.push(state.id) : nonFinalStates.push(state.id);