feat(19.6.1-01): Administrators screen and cross-controller record actions
- pact.HasAdminActionExtensions / AdminActionExtension: plugins add record actions to any admin controller by ID, merged at boot before permission validation (unknown target, no preview, duplicate name stop the boot) - internal summercms.cabana pseudo-plugin, appended only when some plugin registers admin controllers: Administrators list and preview, settings link under System, backend.manage_users and backend.manage_roles with no role grants - backend::lang user, user.role and permissions copy (en, pl) - smoke tests: compile-time seam and settings, Postgres list/preview/action
This commit is contained in:
@@ -233,6 +233,7 @@ func compilePermissionCatalog(reg *Registry, plugins []party.Plugin) error {
|
||||
return fmt.Errorf("cabana: duplicate permission %s", permission.Code)
|
||||
}
|
||||
reg.permissions[permission.Code] = permission
|
||||
reg.permissionOrder = append(reg.permissionOrder, permission.Code)
|
||||
for _, role := range permission.Roles {
|
||||
role = strings.TrimSpace(role)
|
||||
if role == "" {
|
||||
@@ -270,6 +271,7 @@ func compileContributions(reg *Registry, plugins []party.Plugin) error {
|
||||
return fmt.Errorf("cabana: registry is nil")
|
||||
}
|
||||
reg.permissions = map[string]pact.Permission{}
|
||||
reg.permissionOrder = nil
|
||||
reg.roleGrants = map[string]map[string]bool{}
|
||||
reg.settings = map[string]*CompiledSetting{}
|
||||
seenNavigation := map[string]struct{}{}
|
||||
|
||||
Reference in New Issue
Block a user