Changes to match the designated endpoint of the user when uploading an Item to dont have the system Jump between the systems.
Release Inventarsystem / release-docker (push) Successful in 2m19s
Release Inventarsystem / release-docker (push) Successful in 2m19s
This commit is contained in:
+2
-6
@@ -5177,17 +5177,13 @@ def upload_item():
|
|||||||
|
|
||||||
fs = get_gridfs()
|
fs = get_gridfs()
|
||||||
|
|
||||||
can_access_admin_home = _page_access_allowed(permissions, 'home_admin') and _action_access_allowed(permissions, 'can_manage_settings')
|
if cfg.MODULES.is_enabled('library') and sanitize_form_value(request.form.get('item_type_input', '')) != "other":
|
||||||
if can_access_admin_home:
|
success_redirect_endpoint = 'library'
|
||||||
success_redirect_endpoint = 'home_admin'
|
|
||||||
elif cfg.MODULES.is_enabled('library') and _page_access_allowed(permissions, 'home_library'):
|
|
||||||
success_redirect_endpoint = 'home_library'
|
|
||||||
else:
|
else:
|
||||||
success_redirect_endpoint = 'home_admin'
|
success_redirect_endpoint = 'home_admin'
|
||||||
|
|
||||||
# Detect if request is from mobile device
|
# Detect if request is from mobile device
|
||||||
is_mobile = 'Mobile' in request.headers.get('User-Agent', '')
|
is_mobile = 'Mobile' in request.headers.get('User-Agent', '')
|
||||||
is_ios = 'iPhone' in request.headers.get('User-Agent', '') or 'iPad' in request.headers.get('User-Agent', '')
|
|
||||||
|
|
||||||
# Log mobile request for debugging
|
# Log mobile request for debugging
|
||||||
if is_mobile:
|
if is_mobile:
|
||||||
|
|||||||
Reference in New Issue
Block a user