24 lines
554 B
Go
24 lines
554 B
Go
// Package permissions provides constants for RBAC
|
|
package permissions
|
|
|
|
type Permission string
|
|
|
|
func (p Permission) String() string {
|
|
return string(p)
|
|
}
|
|
|
|
const (
|
|
// Wildcard - grants all permissions
|
|
Wildcard Permission = "*"
|
|
|
|
// Seasons permissions
|
|
SeasonsCreate Permission = "seasons.create"
|
|
SeasonsUpdate Permission = "seasons.update"
|
|
SeasonsDelete Permission = "seasons.delete"
|
|
|
|
// Users permissions
|
|
UsersUpdate Permission = "users.update"
|
|
UsersBan Permission = "users.ban"
|
|
UsersManageRoles Permission = "users.manage_roles"
|
|
)
|