Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchBasePermFromPerm ¶
FetchBasePermFromPerm returns the base permission number from the permission
func FetchGroupFromPerm ¶
FetchGroupFromPerm returns the group from the permission
func FetchSectionFromPerm ¶
FetchSectionFromPerm returns the section from the permission
Types ¶
type UserPermissions ¶
type UserPermissions struct { // Sections is a number representing the sections that are utilized for this user's permissions Sections int `json:"S"` Permissions map[int]map[int]int `json:"P"` }
func NewUserPermissions ¶
func NewUserPermissions(perms ...int) *UserPermissions
func (*UserPermissions) AddPerm ¶
func (up *UserPermissions) AddPerm(fullPerm ...int)
func (*UserPermissions) HasPerm ¶
func (up *UserPermissions) HasPerm(fullPerm int) bool
func (*UserPermissions) RemovePerm ¶
func (up *UserPermissions) RemovePerm(fullPerm int)
Click to show internal directories.
Click to hide internal directories.