mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-01 10:00:19 +08:00
feat: get all role/permission of an user (#1978)
This commit is contained in:
@ -278,3 +278,13 @@ func GetEndPoint(endpoint string) string {
|
||||
}
|
||||
return endpoint
|
||||
}
|
||||
|
||||
// HasString reports if slice has input string.
|
||||
func HasString(strs []string, str string) bool {
|
||||
for _, i := range strs {
|
||||
if i == str {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user