Skip to content
Snippets Groups Projects
Commit a2c31fb7 authored by Bharath Vamsi Adurti's avatar Bharath Vamsi Adurti Committed by garciadeblas
Browse files

Bug 2403 Fixed: Able to change username of other users with no admin privileges


Change-Id: If5648c82e8bf2cd746877e560c14851a585f4385
Signed-off-by: default avataradurti <adurti.v@tataelxsi.co.in>
Signed-off-by: default avatargarciadeblas <gerardo.garciadeblas@telefonica.com>
parent 9103e544
Branches v15.0
Tags v15.0.2
No related merge requests found
......@@ -1096,6 +1096,16 @@ class UserTopicAuth(UserTopic):
http_code=HTTPStatus.BAD_REQUEST,
)
# username change
if indata.get("username"):
if not session.get("admin_show"):
if not indata.get("system_admin_id"):
if _id != session["user_id"]:
raise EngineException(
"You are not allowed to change other users username",
http_code=HTTPStatus.BAD_REQUEST,
)
# user = self.show(session, _id) # Already in 'content'
original_mapping = content["project_role_mappings"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment