mirror of
https://github.com/1f349/lavender.git
synced 2024-12-22 07:34:06 +00:00
Automatically set specific permissions
This commit is contained in:
parent
ba90e41312
commit
1940f2de71
@ -12,4 +12,5 @@ type Conf struct {
|
|||||||
Issuer string `json:"issuer"`
|
Issuer string `json:"issuer"`
|
||||||
SsoServices []issuer.SsoConfig `json:"sso_services"`
|
SsoServices []issuer.SsoConfig `json:"sso_services"`
|
||||||
AllowedClients []utils.JsonUrl `json:"allowed_clients"`
|
AllowedClients []utils.JsonUrl `json:"allowed_clients"`
|
||||||
|
Permissions []string `json:"permissions"`
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,9 @@ func (h *HttpServer) flowCallback(rw http.ResponseWriter, req *http.Request, _ h
|
|||||||
}
|
}
|
||||||
|
|
||||||
ps := claims.NewPermStorage()
|
ps := claims.NewPermStorage()
|
||||||
|
for _, i := range h.conf.Permissions {
|
||||||
|
ps.Set(i)
|
||||||
|
}
|
||||||
|
|
||||||
if verified, ok := v3["email_verified"].(bool); ok && verified {
|
if verified, ok := v3["email_verified"].(bool); ok && verified {
|
||||||
if mailAddress, ok := v3["email"].(string); ok {
|
if mailAddress, ok := v3["email"].(string); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user