Browse Source

permissions fix for view.

lllllllillllllillll 1 year ago
parent
commit
8082b3e4e7
3 changed files with 4 additions and 2 deletions
  1. 2 0
      CHANGELOG.md
  2. 1 1
      controllers/dashboard.js
  3. 1 1
      views/partials/settings.html

+ 2 - 0
CHANGELOG.md

@@ -14,6 +14,8 @@
 * New (again) - PM2 to keep the app running if it encounters an error.
 * New (again) - PM2 to keep the app running if it encounters an error.
 * New - User registration enabled/disabled from Settings page.
 * New - User registration enabled/disabled from Settings page.
 * Removed 'SECRET' environment variable.
 * Removed 'SECRET' environment variable.
+* New - Custom container links.
+* Fixed issue updating view permission.
 
 
 ## v0.60 (June 9th 2024) - Permissions system and import templates
 ## v0.60 (June 9th 2024) - Permissions system and import templates
 * Converted JS template literals into HTML.
 * Converted JS template literals into HTML.

+ 1 - 1
controllers/dashboard.js

@@ -399,7 +399,7 @@ export const UpdatePermissions = async (req, res) => {
         await Permission.update({ uninstall: false, edit: false, upgrade: false, start: false, stop: false, pause: false, restart: false, logs: false, view: false }, { where: { containerName: container} });
         await Permission.update({ uninstall: false, edit: false, upgrade: false, start: false, stop: false, pause: false, restart: false, logs: false, view: false }, { where: { containerName: container} });
         return;
         return;
     }
     }
-    await Permission.update({ uninstall: false, edit: false, upgrade: false, start: false, stop: false, pause: false, restart: false, logs: false }, { where: { containerName: container, user: user } });
+    await Permission.update({ uninstall: false, edit: false, upgrade: false, start: false, stop: false, pause: false, restart: false, logs: false, view: false}, { where: { containerName: container, user: user } });
     Object.keys(req.body).forEach(async function(key) {
     Object.keys(req.body).forEach(async function(key) {
         if (key != 'user' && key != 'container') {
         if (key != 'user' && key != 'container') {
             let permissions = req.body[key];
             let permissions = req.body[key];

+ 1 - 1
views/partials/settings.html

@@ -23,7 +23,7 @@
 				</div>
 				</div>
 		
 		
 				<h3 class="mt-5">Container Links</h3>
 				<h3 class="mt-5">Container Links</h3>
-				<label class="text-muted mb-2">Choose the default behaviour for container links. Enter IP address or Domain before enabling.</label>
+				<label class="text-muted mb-2">Choose the default behaviour for container links.</label>
 				<div class="row align-items-center">
 				<div class="row align-items-center">
 					<div class="col-auto">
 					<div class="col-auto">
 						<label class="form-check form-switch form-switch-lg">
 						<label class="form-check form-switch form-switch-lg">