From 2b1cf6dec4fce605fec7d059bd519fdb57a20265 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 19 Apr 2024 14:50:03 +0200 Subject: [PATCH 1/4] indent and disable settings --- .../meeting-settings-definitions.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index 405f83b4c9..a562c7c07f 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -911,17 +911,23 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ { key: `users_forbid_delegator_in_list_of_speakers`, label: _(`Restrict delegation principals from adding themselves to the list of speakers`), - type: `boolean` + type: `boolean`, + indentation: 1, + disable: settings => !settings.users_enable_vote_delegations }, { key: `users_forbid_delegator_as_submitter`, label: _(`Restrict delegation principals from creating motions/amendments`), - type: `boolean` + type: `boolean`, + indentation: 1, + disable: settings => !settings.users_enable_vote_delegations }, { key: `users_forbid_delegator_as_supporter`, label: _(`Restrict delegation principals from supporting motions`), - type: `boolean` + type: `boolean`, + indentation: 1, + disable: settings => !settings.users_enable_vote_delegations } ] }, From 1b8c7b2dbe900a4db4e181738100e82d96c4a5af Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 19 Apr 2024 15:29:39 +0200 Subject: [PATCH 2/4] start adding permissions --- .../list-of-speakers-content.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.ts b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.ts index e27dbd4233..d9dc88428e 100644 --- a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.ts +++ b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.ts @@ -152,6 +152,8 @@ export class ListOfSpeakersContentComponent extends BaseMeetingComponent impleme private _listOfSpeakers: ViewListOfSpeakers | null = null; + private _voteDelegationEnabled = false; + private get onlyPresentUsers(): boolean { return this.meetingSettingsService.instant(`list_of_speakers_present_users_only`) ?? false; } @@ -168,6 +170,11 @@ export class ListOfSpeakersContentComponent extends BaseMeetingComponent impleme private interactionService: InteractionService ) { super(); + this.subscriptions.push( + this.meetingSettingsService + .get(`users_enable_vote_delegations`) + .subscribe(allowed => (this._voteDelegationEnabled = allowed)) + ); } public ngOnInit(): void { From f41e9b1433c2f9c93d81dd3d5cf2916bbee37194 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Mon, 22 Apr 2024 09:20:38 +0200 Subject: [PATCH 3/4] enable/disable for LoS --- .../src/app/domain/models/meetings/meeting.ts | 6 ++--- .../list-of-speakers-content.component.html | 11 +-------- .../list-of-speakers-content.component.ts | 23 +++++++++++++------ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/client/src/app/domain/models/meetings/meeting.ts b/client/src/app/domain/models/meetings/meeting.ts index a584b8956c..b3821fec4c 100644 --- a/client/src/app/domain/models/meetings/meeting.ts +++ b/client/src/app/domain/models/meetings/meeting.ts @@ -163,9 +163,9 @@ export class Settings { public users_email_replyto!: string; public users_email_subject!: string; public users_email_body!: string; - public users_forbid_delegator_in_list_of_speakers!: string; - public users_forbid_delegator_as_submitter!: string; - public users_forbid_delegator_as_supporter!: string; + public users_forbid_delegator_in_list_of_speakers!: boolean; + public users_forbid_delegator_as_submitter!: boolean; + public users_forbid_delegator_as_supporter!: boolean; // Assignments public assignments_export_title!: string; diff --git a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.html b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.html index 3f119ba50b..9ae1d79c1f 100644 --- a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.html +++ b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/list-of-speakers-content/list-of-speakers-content.component.html @@ -102,16 +102,7 @@ You have to be present to add yourself. -
+