- the list opens the preview, which shows one status hint (banned, deactivated, not activated, suspended) and the IP address fields - bulk actions activate, deactivate, restore, ban and unban; record actions activate, unban and unsuspend, offered while they apply - delete (form button and bulk) removes the user for good with the throttle rows, group memberships and attachments in one transaction; blobs go after the commit - a privileged-group member is still refused, a bulk delete as a whole
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package user
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
|
|
"git.golem15.com/golem15/sm-user-plugin/controllers"
|
|
"git.golem15.com/golem15/summercms/modules/backpack"
|
|
"git.golem15.com/golem15/summercms/modules/pact"
|
|
)
|
|
|
|
// adminFS holds the admin YAML and partials, file by file: the controllers
|
|
// directory also holds files that are not admin assets.
|
|
//
|
|
//go:embed controllers/users/config_list.yaml controllers/users/config_form.yaml controllers/users/config_filter.yaml controllers/users/_hint.htm models/user/fields.yaml models/user/columns.yaml
|
|
var adminFS embed.FS
|
|
|
|
func (p *Plugin) AdminFS() fs.FS { return adminFS }
|
|
|
|
// AdminControllers hands the controllers a lazy accessor of the booted app,
|
|
// so they read the database handle and the config at request time.
|
|
func (p *Plugin) AdminControllers() []pact.AdminController {
|
|
return controllers.AdminControllers(func() *backpack.App {
|
|
if p == nil {
|
|
return nil
|
|
}
|
|
return p.app
|
|
})
|
|
}
|
|
|
|
var (
|
|
_ pact.AdminAssets = (*Plugin)(nil)
|
|
_ pact.HasAdminControllers = (*Plugin)(nil)
|
|
_ pact.HasPermissions = (*Plugin)(nil)
|
|
_ pact.HasNavigation = (*Plugin)(nil)
|
|
)
|