[SM-554] hide admin onboarding items from non-admin (#4843)
* hide onboarding items if not admin * fix inconsistent padding
This commit is contained in:
parent
b7f465e552
commit
da9f4e1fb3
|
@ -10,11 +10,12 @@
|
||||||
icon="bwi-cli"
|
icon="bwi-cli"
|
||||||
[completed]="view.tasks.createServiceAccount"
|
[completed]="view.tasks.createServiceAccount"
|
||||||
>
|
>
|
||||||
<span>
|
<span class="tw-pl-1">
|
||||||
{{ "downloadThe" | i18n }} <a bitLink routerLink="">{{ "smCLI" | i18n }}</a>
|
{{ "downloadThe" | i18n }} <a bitLink routerLink="">{{ "smCLI" | i18n }}</a>
|
||||||
</span>
|
</span>
|
||||||
</sm-onboarding-task>
|
</sm-onboarding-task>
|
||||||
<sm-onboarding-task
|
<sm-onboarding-task
|
||||||
|
*ngIf="userIsAdmin"
|
||||||
[title]="'importSecrets' | i18n"
|
[title]="'importSecrets' | i18n"
|
||||||
[route]="['settings', 'import']"
|
[route]="['settings', 'import']"
|
||||||
icon="bwi-download"
|
icon="bwi-download"
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
[completed]="view.tasks.createSecret"
|
[completed]="view.tasks.createSecret"
|
||||||
></sm-onboarding-task>
|
></sm-onboarding-task>
|
||||||
<sm-onboarding-task
|
<sm-onboarding-task
|
||||||
|
*ngIf="userIsAdmin"
|
||||||
[title]="'createProject' | i18n"
|
[title]="'createProject' | i18n"
|
||||||
(click)="openNewProjectDialog()"
|
(click)="openNewProjectDialog()"
|
||||||
icon="bwi-collection"
|
icon="bwi-collection"
|
||||||
|
|
|
@ -57,6 +57,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
||||||
private tableSize = 10;
|
private tableSize = 10;
|
||||||
private organizationId: string;
|
private organizationId: string;
|
||||||
protected organizationName: string;
|
protected organizationName: string;
|
||||||
|
protected userIsAdmin: boolean;
|
||||||
|
|
||||||
protected view$: Observable<{
|
protected view$: Observable<{
|
||||||
allProjects: ProjectListView[];
|
allProjects: ProjectListView[];
|
||||||
|
@ -96,6 +97,7 @@ export class OverviewComponent implements OnInit, OnDestroy {
|
||||||
.subscribe((org) => {
|
.subscribe((org) => {
|
||||||
this.organizationId = org.id;
|
this.organizationId = org.id;
|
||||||
this.organizationName = org.name;
|
this.organizationName = org.name;
|
||||||
|
this.userIsAdmin = org.isAdmin;
|
||||||
});
|
});
|
||||||
|
|
||||||
const projects$ = combineLatest([
|
const projects$ = combineLatest([
|
||||||
|
|
Loading…
Reference in New Issue