TRA-4202 role management (#688)

* WIP

* wip

* Update keto.yml, socket_routes.go, and 12 more files...

* fixes and docs

* Update api.js

* Update auth.go and api.js

* Update user_role_provider.go

* Update config_routes.go and api.js

* Update consts.go
This commit is contained in:
RamiBerm
2022-01-25 14:25:24 +02:00
committed by GitHub
parent 86edc91f4c
commit 83c9194703
25 changed files with 590 additions and 76 deletions

View File

@@ -85,3 +85,18 @@ func SaveJsonFile(filePath string, value interface{}) error {
return nil
}
func UniqueStringSlice(s []string) []string {
uniqueSlice := make([]string, 0)
uniqueMap := map[string]bool{}
for _, val := range s {
if uniqueMap[val] == true {
continue
}
uniqueMap[val] = true
uniqueSlice = append(uniqueSlice, val)
}
return uniqueSlice
}