Documentation
¶
Index ¶
- Constants
- Variables
- func AddResRoleMap(res, roles string)
- func CheckRoles(needRoles, userRoles string) bool
- func InitAuthMap()
- func IsCanAccessRes(checkRes, userRoles string) bool
- func LoadAuthMapFile(location string) error
- func PrintIsCanAccessRes(checkRes, userRoles string, expect bool)
- func PrintResRoleAuthMap()
- func QualifyRole(role string) string
- func QualifyRoles(roles string) []string
- func QualifyRolesStr(roles string) string
Constants ¶
View Source
const ROLE_PREFIX = "ROLE_"
Variables ¶
View Source
var ResRoleMap = [][]string{}
Functions ¶
func CheckRoles ¶
func InitAuthMap ¶
func InitAuthMap()
func PrintIsCanAccessRes ¶
PrintIsCanAccessRes
func PrintResRoleAuthMap ¶
func PrintResRoleAuthMap()
func QualifyRole ¶
func QualifyRoles ¶
func QualifyRolesStr ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.