feat: use multi roles login (#60)

* feat: use multi roles login

- add support for protected roles
- refactor oauth code

* fix: adminUpdate role validation

* fix: update app
This commit is contained in:
Lakhan Samani
2021-10-13 22:11:41 +05:30
committed by GitHub
parent 27944cf7b5
commit b376ee3b73
23 changed files with 248 additions and 219 deletions

View File

@@ -18,3 +18,12 @@ func WriteToFile(filename string, data string) error {
}
return file.Sync()
}
func StringContains(s []string, e string) bool {
for _, a := range s {
if a == e {
return true
}
}
return false
}