Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
EOLE
Zéphir
Services
Server Manager
Commits
fabb64e0
Commit
fabb64e0
authored
Apr 04, 2019
by
Matthieu Lamalle
Browse files
correction on _get_serverselection_user_role key role
parent
6ce224de
Pipeline
#415
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
scripts/controller
View file @
fabb64e0
...
...
@@ -560,7 +560,7 @@ class ServerRunner(ZephirCommonController):
@
register_wamp
(
'v1.serverselection.user.remove'
,
notification_uri
=
None
,
database
=
True
,
profil_adapter
=
'get_profil_for_serverselection'
)
async
def
remove_user_from_serverselection
(
self
,
cursor
,
_session_user
,
serverselectionid
,
username
):
try
:
if
self
.
_get_serverselection_user_role
(
cursor
,
serverselectionid
,
username
)[
'
p
ro
fi
l'
]
!=
'owner'
:
if
self
.
_get_serverselection_user_role
(
cursor
,
serverselectionid
,
username
)[
'rol
e
'
]
!=
'owner'
:
return
self
.
serverselection
.
remove_user_from_serverselection
(
cursor
,
serverselectionid
,
username
)
else
:
raise
Exception
(
_
(
'Can not remove user with role owner from serverseleciton'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment