mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 09:45:28 +01:00
Merge branch 'bug/dev-schedules-users' into 'dev'
Fix cron edit traceback. See merge request crafty-controller/crafty-4!466
This commit is contained in:
commit
251e676fec
@ -13,6 +13,12 @@
|
||||
### Tweaks
|
||||
- Add button to scroll to bottom of vterm ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/454))
|
||||
- Persist schedules and execution commands across backup restores ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/458))
|
||||
### Release Testing- Bug fixes
|
||||
- Fix bug with logical issues surrounding gravatar caching ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/465))
|
||||
- Fix bug where server terminal would not scroll on startup ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/465))
|
||||
- Fix issue on post with adding users when no email is included (this also affected editing users) ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/466))
|
||||
- Fix issue with schedules allowing days to be more than 30 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/466))
|
||||
- Fix issue with schedules when trying to edit a cron task ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/466))
|
||||
<br><br>
|
||||
|
||||
## --- [4.0.12] - 2022/09/04
|
||||
|
@ -157,9 +157,13 @@ class UsersController:
|
||||
base_data = HelperUsers.get_user(user_id)
|
||||
up_data = {}
|
||||
# check if we updated user email. If so we update gravatar
|
||||
if user_data["email"] != base_data["email"]:
|
||||
pfp = self.helper.get_gravatar_image(user_data["email"])
|
||||
up_data["pfp"] = pfp
|
||||
try:
|
||||
if user_data["email"] != base_data["email"]:
|
||||
pfp = self.helper.get_gravatar_image(user_data["email"])
|
||||
up_data["pfp"] = pfp
|
||||
except KeyError:
|
||||
logger.debug("Email not updated")
|
||||
# email not updated
|
||||
# create sets to store role data
|
||||
added_roles = set()
|
||||
removed_roles = set()
|
||||
|
@ -1068,6 +1068,7 @@ class PanelHandler(BaseHandler):
|
||||
page_data["parent"] = None
|
||||
else:
|
||||
difficulty = "advanced"
|
||||
page_data["parent"] = None
|
||||
page_data["schedule"]["difficulty"] = difficulty
|
||||
|
||||
if not EnumPermissionsServer.SCHEDULE in page_data["user_permissions"]:
|
||||
@ -1699,6 +1700,12 @@ class PanelHandler(BaseHandler):
|
||||
# only check for time if it's number of days
|
||||
if interval_type == "days":
|
||||
sch_time = bleach.clean(self.get_argument("time", None))
|
||||
if interval > 30:
|
||||
self.redirect(
|
||||
"/panel/error?error=Invalid argument."
|
||||
" Days must be 30 or fewer."
|
||||
)
|
||||
return
|
||||
if action == "command":
|
||||
command = self.get_argument("command", None)
|
||||
elif action == "start":
|
||||
@ -1861,6 +1868,12 @@ class PanelHandler(BaseHandler):
|
||||
# only check for time if it's number of days
|
||||
if interval_type == "days":
|
||||
sch_time = bleach.clean(self.get_argument("time", None))
|
||||
if interval > 30:
|
||||
self.redirect(
|
||||
"/panel/error?error=Invalid argument."
|
||||
" Days must be 30 or fewer."
|
||||
)
|
||||
return
|
||||
if action == "command":
|
||||
command = self.get_argument("command", None)
|
||||
elif action == "start":
|
||||
|
Loading…
x
Reference in New Issue
Block a user