mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-09-06 21:11:11 +00:00
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user