liquid_feedback_frontend
annotate env/util/scope_name.lua @ 1642:45287f1037fb
Support precondtions if LDAP accounts may login
| author | bsw | 
|---|---|
| date | Tue Feb 09 21:07:16 2021 +0100 (2021-02-09) | 
| parents | 32cc544d5a5b | 
| children | 
| rev | line source | 
|---|---|
| bsw/jbe@1309 | 1 function util.scope_name(scope) | 
| bsw/jbe@1309 | 2 local name | 
| bsw/jbe@1309 | 3 for i, entry in ipairs(config.oauth2.available_scopes) do | 
| bsw/jbe@1309 | 4 if entry.scope == scope then | 
| bsw/jbe@1309 | 5 name = entry.name[locale.get("lang")] or entry.scope | 
| bsw/jbe@1309 | 6 end | 
| bsw/jbe@1309 | 7 end | 
| bsw/jbe@1309 | 8 return name | 
| bsw/jbe@1309 | 9 end |