Documentation ¶
Index ¶
- func GetGroups(jid string) (bool, []string)
- func GrantPermission(jid string, permission string)
- func HasPermission(jid string, permission string) bool
- func IsGroupMember(jid string, group string) bool
- func Load(path string) bool
- func RevokePermission(jid string, permission string)
- func Save(path string) bool
- type GroupsTable
- type PermGroup
- type PermsTable
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GrantPermission ¶
func HasPermission ¶
HasPermission returns true if a jid has the provided permission.
func IsGroupMember ¶
IsGroupMember returns true is a user is in the provided group. Will also return false if the group does not exist.
func RevokePermission ¶
Types ¶
type GroupsTable ¶
type GroupsTable struct {
Groups []PermGroup
}
type PermsTable ¶
type PermsTable struct {
Users []User
}
Click to show internal directories.
Click to hide internal directories.