From 5d35a0fa5f1eca6175f6f162c03d7852ca8385a5 Mon Sep 17 00:00:00 2001 From: Sean Engelhardt Date: Thu, 14 Mar 2019 12:57:12 +0100 Subject: [PATCH] Fix certain permission checks Fixed permissions in topic detail, agenda list and user detail. Fixes Z-Level of head bar and mat-spinner. --- .../components/head-bar/head-bar.component.scss | 2 +- .../agenda-list/agenda-list.component.html | 2 +- .../components/agenda-list/agenda-list.component.ts | 7 +++++-- .../list-of-speakers/list-of-speakers.component.scss | 2 +- .../topic-detail/topic-detail.component.html | 12 +++++++----- .../topic-detail/topic-detail.component.ts | 4 ++-- .../components/login-mask/login-mask.component.scss | 1 + .../user-detail/user-detail.component.html | 7 ++++++- 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/client/src/app/shared/components/head-bar/head-bar.component.scss b/client/src/app/shared/components/head-bar/head-bar.component.scss index b89de1649..51f47aa61 100644 --- a/client/src/app/shared/components/head-bar/head-bar.component.scss +++ b/client/src/app/shared/components/head-bar/head-bar.component.scss @@ -11,7 +11,7 @@ position: -o-sticky; position: sticky; top: 0px; - z-index: 3; + z-index: 5; } .toolbar-left { diff --git a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.html b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.html index 8f195fe9f..b5dea4b01 100644 --- a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.html +++ b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.html @@ -54,7 +54,7 @@ Info
-
+
visibility {{ item.verboseType | translate }}
diff --git a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts index 7d1ee94b9..68df26fa7 100644 --- a/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts +++ b/client/src/app/site/agenda/components/agenda-list/agenda-list.component.ts @@ -33,12 +33,12 @@ export class AgendaListComponent extends ListViewBaseComponent i /** * Determine the display columns in desktop view */ - public displayedColumnsDesktop: string[] = ['title', 'info', 'speakers', 'menu']; + public displayedColumnsDesktop: string[] = ['title', 'info', 'speakers']; /** * Determine the display columns in mobile view */ - public displayedColumnsMobile: string[] = ['title', 'speakers', 'menu']; + public displayedColumnsMobile: string[] = ['title', 'speakers']; public isNumberingAllowed: boolean; @@ -263,6 +263,9 @@ export class AgendaListComponent extends ListViewBaseComponent i */ public getColumnDefinition(): string[] { let columns = this.vp.isMobile ? this.displayedColumnsMobile : this.displayedColumnsDesktop; + if (this.operator.hasPerms('agenda.can_manage')) { + columns = columns.concat(['menu']); + } if (this.operator.hasPerms('core.can_manage_projector') && !this.isMultiSelect) { columns = ['projector'].concat(columns); } diff --git a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.scss b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.scss index 0cf51ced4..1a3d61ec0 100644 --- a/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.scss +++ b/client/src/app/site/agenda/components/list-of-speakers/list-of-speakers.component.scss @@ -63,7 +63,7 @@ } .add-self-buttons { - padding: 0 0 20px 25px; + padding: 20px 0 20px 25px; } .speaker-warning { diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html index 3c458af62..c1658ffc7 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.html @@ -111,9 +111,11 @@ mic List of speakers - - +
+ + +
diff --git a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts index be5147aa6..17e886f64 100644 --- a/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts +++ b/client/src/app/site/agenda/components/topic-detail/topic-detail.component.ts @@ -230,9 +230,9 @@ export class TopicDetailComponent extends BaseViewComponent { public isAllowed(action: string): boolean { switch (action) { case 'see': - return this.operator.hasPerms('agenda.can_manage'); - case 'edit': return this.operator.hasPerms('agenda.can_see'); + case 'edit': + return this.operator.hasPerms('agenda.can_manage'); case 'default': return false; } diff --git a/client/src/app/site/login/components/login-mask/login-mask.component.scss b/client/src/app/site/login/components/login-mask/login-mask.component.scss index 80018d267..8f97a07e9 100644 --- a/client/src/app/site/login/components/login-mask/login-mask.component.scss +++ b/client/src/app/site/login/components/login-mask/login-mask.component.scss @@ -24,6 +24,7 @@ mat-form-field { right: 0; margin-left: auto; margin-right: auto; + z-index: 2; } } diff --git a/client/src/app/site/users/components/user-detail/user-detail.component.html b/client/src/app/site/users/components/user-detail/user-detail.component.html index 174dd6832..1d6d653e3 100644 --- a/client/src/app/site/users/components/user-detail/user-detail.component.html +++ b/client/src/app/site/users/components/user-detail/user-detail.component.html @@ -16,7 +16,12 @@