feat: get all role/permission of an user (#1978)

This commit is contained in:
June
2023-06-16 21:44:21 +07:00
committed by GitHub
parent ebc0e0f2c9
commit edc6aa0d50
5 changed files with 78 additions and 20 deletions

View File

@ -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
}