mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'bug/general-user-gravatar' into 'dev'
Bug/general user gravatar See merge request crafty-controller/crafty-commander!232
This commit is contained in:
commit
f00830aeb5
@ -1763,6 +1763,7 @@ class PanelHandler(BaseHandler):
|
|||||||
user_data = {
|
user_data = {
|
||||||
"username": username,
|
"username": username,
|
||||||
"password": password0,
|
"password": password0,
|
||||||
|
"email": email,
|
||||||
"lang": lang,
|
"lang": lang,
|
||||||
}
|
}
|
||||||
self.controller.users.update_user(user_id, user_data=user_data)
|
self.controller.users.update_user(user_id, user_data=user_data)
|
||||||
@ -1903,14 +1904,15 @@ class PanelHandler(BaseHandler):
|
|||||||
lang = bleach.clean(
|
lang = bleach.clean(
|
||||||
self.get_argument("lang", helper.get_setting("language"))
|
self.get_argument("lang", helper.get_setting("language"))
|
||||||
)
|
)
|
||||||
|
# We don't want a non-super user to be able to create a super user.
|
||||||
if superuser:
|
if superuser:
|
||||||
superuser = bleach.clean(self.get_argument("superuser", "0"))
|
new_superuser = bleach.clean(self.get_argument("superuser", "0"))
|
||||||
else:
|
else:
|
||||||
superuser = "0"
|
new_superuser = "0"
|
||||||
if superuser == "1":
|
if superuser == "1":
|
||||||
superuser = True
|
new_superuser = True
|
||||||
else:
|
else:
|
||||||
superuser = False
|
new_superuser = False
|
||||||
|
|
||||||
if Enum_Permissions_Crafty.User_Config not in exec_user_crafty_permissions:
|
if Enum_Permissions_Crafty.User_Config not in exec_user_crafty_permissions:
|
||||||
self.redirect(
|
self.redirect(
|
||||||
@ -1938,7 +1940,7 @@ class PanelHandler(BaseHandler):
|
|||||||
password=password0,
|
password=password0,
|
||||||
email=email,
|
email=email,
|
||||||
enabled=enabled,
|
enabled=enabled,
|
||||||
superuser=superuser,
|
superuser=new_superuser,
|
||||||
)
|
)
|
||||||
user_data = {
|
user_data = {
|
||||||
"roles": roles,
|
"roles": roles,
|
||||||
|
Loading…
Reference in New Issue
Block a user