From 8082b3e4e70d7d87043a3634afb9bd527d6ea08c Mon Sep 17 00:00:00 2001 From: lllllllillllllillll Date: Mon, 24 Jun 2024 01:39:25 -0700 Subject: [PATCH] permissions fix for view. --- CHANGELOG.md | 2 ++ controllers/dashboard.js | 2 +- views/partials/settings.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5777959..9a7292c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ * New (again) - PM2 to keep the app running if it encounters an error. * New - User registration enabled/disabled from Settings page. * Removed 'SECRET' environment variable. +* New - Custom container links. +* Fixed issue updating view permission. ## v0.60 (June 9th 2024) - Permissions system and import templates * Converted JS template literals into HTML. diff --git a/controllers/dashboard.js b/controllers/dashboard.js index c5f04eb..e27d3e5 100644 --- a/controllers/dashboard.js +++ b/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} }); 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) { if (key != 'user' && key != 'container') { let permissions = req.body[key]; diff --git a/views/partials/settings.html b/views/partials/settings.html index 4dcd7f5..63cbb0d 100644 --- a/views/partials/settings.html +++ b/views/partials/settings.html @@ -23,7 +23,7 @@

Container Links

- +