diff --git a/modules/public/users.py b/modules/public/users.py index 51c6841..8a9356d 100644 --- a/modules/public/users.py +++ b/modules/public/users.py @@ -20,6 +20,15 @@ class users: user_validation = procedure_validation.validation().account(APIADDR, allowed_roles) user = user_validation['data'] + allowed_grant = globalvar.allowed_grant + allow = list({ + row + for role in user["profile"]["roles"] + for grant in allowed_grant + if grant["roles"] == role + for row in grant["allowed"] + }) + return Template(params["mako"]["website"]['index']).render( title = globalvar.title, header = globalvar.header, @@ -32,6 +41,7 @@ class users: copyright = globalvar.copyright, ), container = Template(params["mako"]["website"]['container']).render( - token = user['token'] + token = user['token'], + allow = allow ) )