Commit acd7620f authored by Matthieu Lamalle's avatar Matthieu Lamalle

correction in controller for kwargs

parent 85ae9c70
Pipeline #553 passed with stage
in 0 seconds
......@@ -67,13 +67,10 @@ class ServerRunner(ZephirCommonController):
if '_session_user' not in origin_kwargs or origin_kwargs['_session_user']['profil'] == 'root':
return 'root'
else:
if self.origin_kwargs['_session_user']['profil'] == 'root':
role = self.origin_kwargs['_session_user']['profil']
else:
profil = self._get_serverselection_user_role(cursor, serverselection_id, origin_kwargs['_session_user']['username'])
if not 'role' in profil:
return None
role = profil['role']
profil = self._get_serverselection_user_role(cursor, serverselection_id, origin_kwargs['_session_user']['username'])
if not 'role' in profil:
return None
role = profil['role']
if self.policy.enforce(role, uri, 'allowed'):
return role
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment