Files
sm-user-plugin/admin_navigation.go
Jakub Zych a3992879db feat: User Groups admin screen with the users count and privileged codes protected
- controller golem15.user.usergroups behind golem15.users.access_groups
- list with users_count from the list's own query; form with the checkbox
  permission editor stored in user_groups.permissions
- creating a group with a privileged code, changing a code to or from one and
  deleting a privileged group need golem15.users.manage_privileged_groups
- a group delete removes its users_groups rows in the same transaction
- UserGroup gains Fillable, Rules and the read-only UsersCount; PermissionSet.Text
- TestAdminGroups and the D-06 matrix in TestAdminPrivilegedGroups
2026-10-05 13:52:26 +02:00

39 lines
1.1 KiB
Go

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",
},
{
Code: "usergroups",
Label: "golem15.user::lang.groups.all_groups",
Icon: "users",
Permissions: []string{controllers.PermissionAccessGroups},
Controller: "golem15.user.usergroups",
},
},
},
}
}