fix: import cycle issues

This commit is contained in:
Lakhan Samani
2022-05-30 11:54:16 +05:30
parent 1146468a03
commit 7e3bd6a721
37 changed files with 349 additions and 239 deletions

View File

@@ -0,0 +1,16 @@
package validators
import "github.com/authorizerdev/authorizer/server/utils"
// IsValidRoles validates roles
func IsValidRoles(userRoles []string, roles []string) bool {
valid := true
for _, userRole := range userRoles {
if !utils.StringSliceContains(roles, userRole) {
valid = false
break
}
}
return valid
}