Skip to content

Commit

Permalink
NAS-133740: Permission checks (#11386)
Browse files Browse the repository at this point in the history
NAS-133776: Permission checks
NAS-133775: Permission checks
  • Loading branch information
undsoft authored Jan 27, 2025
1 parent 217a59f commit 488ba10
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/app/pages/services/services.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ export class ServicesComponent implements OnInit {
iconName: iconMarker('edit'),
tooltip: this.translate.instant('Edit'),
onClick: (row) => this.configureService(row),
dynamicRequiredRoles: (row) => of(this.servicesService.getRolesRequiredToManage(row.service)),
},
],
}),
Expand Down
1 change: 0 additions & 1 deletion src/app/pages/sharing/iscsi/iscsi.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<ix-page-header [pageTitle]="'iSCSI' | translate">
<button
*ixRequiresRoles="requiredRoles"
mat-button
color="default"
ixTest="global-target-configuration"
Expand Down
3 changes: 1 addition & 2 deletions src/app/pages/sharing/iscsi/iscsi.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MatTabNav, MatTabLink, MatTabNavPanel } from '@angular/material/tabs';
import { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { TranslateService, TranslateModule } from '@ngx-translate/core';
import { async, Subject } from 'rxjs';
import { async } from 'rxjs';
import { filter, map, startWith } from 'rxjs/operators';
import { RequiresRolesDirective } from 'app/directives/requires-roles/requires-roles.directive';
import { UiSearchDirective } from 'app/directives/ui-search.directive';
Expand Down Expand Up @@ -46,7 +46,6 @@ import { IscsiService } from 'app/services/iscsi.service';
export class IscsiComponent {
protected readonly searchableElements = iscsiElements;
protected readonly requiredRoles = [Role.SharingIscsiWrite];
protected readonly needRefresh$ = new Subject<void>();

protected readonly navLinks$ = this.iscsiService.hasFibreChannel().pipe(
startWith(false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ <h3 mat-card-title>
</p>

<button
*ixRequiresRoles="requiredRoles"
mat-icon-button
[ixTest]="'remove-extent-association' + extent.extent"
[title]="'Remove extent association' | translate"
Expand Down
4 changes: 1 addition & 3 deletions src/assets/ui-searchable-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -2775,9 +2775,7 @@
"Global Target Configuration"
],
"synonyms": [],
"requiredRoles": [
"SHARING_ISCSI_WRITE"
],
"requiredRoles": [],
"visibleTokens": [],
"anchorRouterLink": [
"/sharing",
Expand Down

0 comments on commit 488ba10

Please sign in to comment.