feat: register the Users admin screen with the privileged-member guard
- permissions (the four Winter codes and manage_privileged_groups), the user navigation item and the embedded admin YAML - Users controller: list with deactivated users, row states, the groups, created date and activated filters, and the form's name, surname and email - a member of a group in golem15.user.privileged_groups (default admin) keeps their email, password and row unless the administrator holds golem15.users.manage_privileged_groups; the refusal is a 403 that saves nothing
This commit is contained in:
31
admin_navigation.go
Normal file
31
admin_navigation.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"git.golem15.com/golem15/sm-user-plugin/controllers"
|
||||
"git.golem15.com/golem15/summercms/modules/pact"
|
||||
)
|
||||
|
||||
// Navigation is the plugin's Winter registerNavigation() entry: the main item
|
||||
// user (order 555) with its side menu. Controller names an admin controller
|
||||
// id in place of a backend URL, and icons are lucide names.
|
||||
func (*Plugin) Navigation() []pact.NavigationItem {
|
||||
return []pact.NavigationItem{
|
||||
{
|
||||
Code: "user",
|
||||
Label: "golem15.user::lang.users.menu_label",
|
||||
Icon: "user",
|
||||
Permissions: []string{"golem15.users.*"},
|
||||
Order: 555,
|
||||
Controller: "golem15.user.users",
|
||||
SideMenu: []pact.NavigationItem{
|
||||
{
|
||||
Code: "users",
|
||||
Label: "golem15.user::lang.users.menu_label",
|
||||
Icon: "user",
|
||||
Permissions: []string{controllers.PermissionAccessUsers},
|
||||
Controller: "golem15.user.users",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user