From f57bd3b80c4eb6bfbca4d92f4e2a9dc403f3bb5c Mon Sep 17 00:00:00 2001 From: TheDevRyan <175502913+The-Dev-Ryan@users.noreply.github.com> Date: Wed, 26 Nov 2025 18:08:08 +0000 Subject: [PATCH] Updated Permissions Checks (#7451) This Fixes a small bug, when switching from Fixed Width/Top Bar back to LeftBar that these 3 was failing the Auth Check and not showing. --- views/default3.handlebars | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/views/default3.handlebars b/views/default3.handlebars index d0a0dc62..3c03d0d8 100644 --- a/views/default3.handlebars +++ b/views/default3.handlebars @@ -2746,6 +2746,8 @@ toggleFullScreen(0); toggleStackMenu(0); if (webPageStackMenu && (xxcurrentView >= 10)) { QC('column_l').add('room4submenu'); } else { QC('column_l').remove('room4submenu'); } + updateSelf() + updateSiteAdmin(); adjustPanels(); } @@ -2943,7 +2945,7 @@ QV('p2AccountImageFrame', !accountSettingsLocked) QV('p2ServerActions', (siteRights & 21) && ((serverFeatures & 143) != 0)); QV('LeftMenuMyServer', (siteRights & 21) && ((serverFeatures & 64) != 0)); // 16 + 4 + 1 - try { (QS('LeftMenuMyServer').display == 'none') ? QC('mobileServerMenuItem').add('d-none') : QC('mobileServerMenuItem').remove('d-none'); } catch (e) { } + ((siteRights & 21) && ((serverFeatures & 64) != 0)) ? QC('mobileServerMenuItem').remove('d-none') : QC('mobileServerMenuItem').add('d-none'); QV('MainMenuMyServer', siteRights & 21); QV('p2ServerActionsBackup', (siteRights & 1) && ((serverFeatures & 1) != 0)); QV('p2ServerActionsRestore', (siteRights & 4) && ((serverFeatures & 2) != 0)); @@ -2952,7 +2954,7 @@ QV('p2ServerActionsConfig', (siteRights & 16) && ((serverFeatures & 128) != 0)); QV('MainMenuMyFiles', siteRights & 8); QV('LeftMenuMyFiles', siteRights & 8); - try { (QS('LeftMenuMyFiles').display == 'none') ? QC('mobileFilesMenuItem').add('d-none') : QC('mobileFilesMenuItem').remove('d-none'); } catch (e) { } + (siteRights & 8) ? QC('mobileFilesMenuItem').remove('d-none') : QC('mobileFilesMenuItem').add('d-none'); if (((siteRights & 8) == 0) && (xxcurrentView == 5)) { setDialogMode(0); go(1); } if (currentNode != null) { gotoDevice(currentNode._id, xxcurrentView, true); } @@ -3082,7 +3084,7 @@ // Adjust "My Users" tabs QV('MainMenuMyUsers', ((users != null) && ((features & 4) == 0)) || (((userinfo.siteadmin & 512) != 0) && ((features & 0x08000000) != 0))); QV('LeftMenuMyUsers', ((users != null) && ((features & 4) == 0)) || (((userinfo.siteadmin & 512) != 0) && ((features & 0x08000000) != 0))); - try { (QS('LeftMenuMyUsers').display == 'none') ? QC('mobileUsersMenuItem').add('d-none') : QC('mobileUsersMenuItem').remove('d-none'); } catch (e) { } + (((users != null) && ((features & 4) == 0)) || (((userinfo.siteadmin & 512) != 0) && ((features & 0x08000000) != 0))) ? QC('mobileUsersMenuItem').remove('d-none') : QC('mobileUsersMenuItem').add('d-none'); QV('UsersGeneral', ((users != null) && ((features & 4) == 0))); QV('UsersGroups', ((users != null) && ((features & 4) == 0))); QV('UsersRecordings', ((userinfo.siteadmin & 512) != 0) && ((features & 0x08000000) != 0));