Documentation ¶
Index ¶
Constants ¶
View Source
const ( AdminName = "admin" PublicName = "public" PublicGroupId = 0 // groupId for content always allowed to access AdminGroupId = 1 // groupId corresponding to role administration ActionAccess = "access" ActionCreate = "create" ActionUpdate = "update" ActionDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminService ¶
type AdminService interface { AuthService GetAllGroups(ctx context.Context, adminId uint64) ([]Group, error) GetActions(ctx context.Context, adminId uint64, roleName string, groupName string) ([]string, error) UpdateUser(ctx context.Context, adminId uint64, userId uint64, roles []Group) error UpdateRole(ctx context.Context, adminId uint64, roleName string, groupName string, actions []string) error GetUserRoles(ctx context.Context, adminId uint64, userId uint64) ([]Group, error) ViewUserRoles(ctx context.Context, adminId uint64, userId uint64) (bool, []Group, error) EditUserRoles(ctx context.Context, adminId uint64, userId uint64) ([]Group, []Group, error) }
type AuthService ¶
type Group ¶
type Group struct { weaver.AutoMarshal Id uint64 Name string Roles []Role }
func (*Group) WeaverMarshal ¶
func (*Group) WeaverUnmarshal ¶
Click to show internal directories.
Click to hide internal directories.