mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: respect global permissions for UI settings (#5919)
This commit is contained in:
		| @@ -163,7 +163,7 @@ export const routes: Routes = [ | ||||
|         canActivate: [PermissionsGuard], | ||||
|         data: { | ||||
|           requiredPermission: { | ||||
|             action: PermissionAction.View, | ||||
|             action: PermissionAction.Change, | ||||
|             type: PermissionType.UISettings, | ||||
|           }, | ||||
|         }, | ||||
|   | ||||
| @@ -351,5 +351,5 @@ | ||||
|  | ||||
|   <div [ngbNavOutlet]="nav" class="border-start border-end border-bottom p-3 mb-3 shadow-sm"></div> | ||||
|  | ||||
|   <button type="submit" class="btn btn-primary mb-2" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.UISettings }" [disabled]="(isDirty$ | async) === false" i18n>Save</button> | ||||
|   <button type="submit" class="btn btn-primary mb-2" [disabled]="(isDirty$ | async) === false" i18n>Save</button> | ||||
| </form> | ||||
|   | ||||
| @@ -55,7 +55,7 @@ | ||||
|           <i-bs class="me-2" name="person"></i-bs> <ng-container i18n>My Profile</ng-container> | ||||
|         </button> | ||||
|         <a ngbDropdownItem class="nav-link" routerLink="settings" (click)="closeMenu()" | ||||
|           *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }"> | ||||
|           *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.UISettings }"> | ||||
|           <i-bs class="me-2" name="gear"></i-bs><ng-container i18n>Settings</ng-container> | ||||
|         </a> | ||||
|         <a ngbDropdownItem class="nav-link d-flex" href="accounts/logout/" (click)="onLogout()"> | ||||
| @@ -227,7 +227,7 @@ | ||||
|           <span i18n>Administration</span> | ||||
|         </h6> | ||||
|         <ul class="nav flex-column mb-2"> | ||||
|           <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.View, type: PermissionType.UISettings }" | ||||
|           <li class="nav-item" *pngxIfPermissions="{ action: PermissionAction.Change, type: PermissionType.UISettings }" | ||||
|             tourAnchor="tour.settings"> | ||||
|             <a class="nav-link" routerLink="settings" routerLinkActive="active" (click)="closeMenu()" | ||||
|               ngbPopover="Settings" i18n-ngbPopover [disablePopover]="!slimSidebarEnabled" placement="end" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon