fix: multi role with oauth (#61)

This commit is contained in:
Lakhan Samani
2021-10-19 12:57:59 +05:30
committed by GitHub
parent b376ee3b73
commit f4992010ed
6 changed files with 82 additions and 78 deletions

View File

@@ -54,7 +54,7 @@ func Token(ctx context.Context, roles []string) (*model.AuthResponse, error) {
if len(roles) > 0 {
for _, v := range roles {
if !utils.StringContains(claimRoles, v) {
if !utils.StringSliceContains(claimRoles, v) {
return res, fmt.Errorf(`unauthorized`)
}
}