diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b852cc6b..6ea67ee9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -64,11 +64,15 @@ import {ManagementComponent} from "@components/management/management.component"; import {RoleManagementComponent} from "@components/role-management/role-management.component"; import {RoleDetailComponent} from "@components/role-management/role-detail/role-detail.component"; import {RoleDetailResolver} from "@resolvers/role-detail.resolver"; -import {PermissionEditorComponent} from "@components/role-management/role-detail/permission-editor/permission-editor.component"; import {PermissionResolver} from "@resolvers/permission.resolver"; -import {PermissionsManagementComponent} from "@components/permissions-management/permissions-management.component"; import {GroupResolver} from "@resolvers/group.resolver"; import {GroupRoleResolver} from "@resolvers/group-role.resolver"; +import {PermissionsManagementComponent} from "@components/permissions-management/permissions-management.component"; +import {UserDetailResolver} from "@resolvers/user-detail.resolver"; +import {UserGroupsResolver} from "@resolvers/user-groups.resolver"; +import {UserPermissionsResolver} from "@resolvers/user-permissions.resolver"; +import {RolePermissionsComponent} from "@components/role-management/role-detail/role-permissions/role-permissions.component"; +import {UserPermissionsComponent} from "@components/user-management/user-detail/user-permissions/user-permissions.component"; const routes: Routes = [ { @@ -93,7 +97,11 @@ const routes: Routes = [ path: 'server/:server_id/management/users/:user_id', component: UserDetailComponent, canActivate: [LoginGuard], - resolve: {server: ServerResolve}, + resolve: { + user: UserDetailResolver, + groups: UserGroupsResolver, + permissions: UserPermissionsResolver, + server: ServerResolve}, }, {path: 'installed-software', component: InstalledSoftwareComponent}, {path: 'server/:server_id/systemstatus', component: SystemStatusComponent, canActivate: [LoginGuard]}, @@ -266,7 +274,7 @@ const routes: Routes = [ }, { path: 'server/:server_id/management/roles/:role_id/permissions', - component: PermissionEditorComponent, + component: RolePermissionsComponent, resolve: { role: RoleDetailResolver, server: ServerResolve, @@ -274,10 +282,14 @@ const routes: Routes = [ } }, { - path: 'server/:server_id/permission_management', - component: PermissionsManagementComponent, - canActivate: [LoginGuard], - resolve: { server: ServerResolve }, + path: 'server/:server_id/management/users/:user_id/permissions', + component: UserPermissionsComponent, + resolve: { + user: UserDetailResolver, + userPermissions: UserPermissionsResolver, + server: ServerResolve, + permissions: PermissionResolver + } } ], }, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 4a8a6c31..6c4f19b9 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -300,6 +300,8 @@ import { PermissionEditorValidateDialogComponent } from './components/role-manag import { PermissionsManagementComponent } from './components/permissions-management/permissions-management.component'; import { PermissionEditLineComponent } from '@components/permissions-management/permission-edit-line/permission-edit-line.component'; import {MatSlideToggleModule} from '@angular/material/slide-toggle'; +import { RolePermissionsComponent } from './components/role-management/role-detail/role-permissions/role-permissions.component'; +import { UserPermissionsComponent } from './components/user-management/user-detail/user-permissions/user-permissions.component'; import {MatAutocompleteModule} from "@angular/material/autocomplete"; import {PathAutoCompleteComponent} from './components/permissions-management/add-permission-line/path-auto-complete/path-auto-complete.component'; import {FilterCompletePipe} from './components/permissions-management/add-permission-line/path-auto-complete/filter-complete.pipe'; @@ -528,7 +530,9 @@ import {MatFormFieldModule} from "@angular/material/form-field"; ActionButtonComponent, DeletePermissionDialogComponent, PathAutoCompleteComponent, - FilterCompletePipe + FilterCompletePipe, + RolePermissionsComponent, + UserPermissionsComponent ], imports: [ BrowserModule, diff --git a/src/app/components/group-details/group-details.component.html b/src/app/components/group-details/group-details.component.html index 472d92e6..c8dfd913 100644 --- a/src/app/components/group-details/group-details.component.html +++ b/src/app/components/group-details/group-details.component.html @@ -3,10 +3,10 @@