feat(19.6.1-01): Roles screen
- Settings -> System -> Roles (summercms.cabana.roles, backend.manage_roles, order 110): name, code slugged from the name, description, checkbox permission editor with the editor's ceiling - system roles (is_system or code-declared grants) keep their code and cannot be deleted; a role any admin holds (deleted ones included) cannot be deleted, the refusal names the role and the count - role codes unique among roles
This commit is contained in:
@@ -74,7 +74,7 @@ func (*backendScreens) AdminFS() fs.FS {
|
||||
}
|
||||
|
||||
func (s *backendScreens) AdminControllers() []pact.AdminController {
|
||||
return []pact.AdminController{usersAdmin{screens: s}}
|
||||
return []pact.AdminController{usersAdmin{screens: s}, rolesAdmin{screens: s}}
|
||||
}
|
||||
|
||||
// Permissions declares the two screen permissions with no role grants
|
||||
@@ -100,6 +100,16 @@ func (*backendScreens) Settings() []pact.SettingsItem {
|
||||
Permissions: []string{PermissionManageUsers},
|
||||
Controller: AdministratorsControllerID,
|
||||
},
|
||||
{
|
||||
Code: "roles",
|
||||
Label: "backend::lang.user.role.menu_label",
|
||||
Description: "backend::lang.user.role.menu_description",
|
||||
Category: "backend::lang.settings.category_system",
|
||||
Icon: "shield-check",
|
||||
Order: 110,
|
||||
Permissions: []string{PermissionManageRoles},
|
||||
Controller: RolesControllerID,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user