feat: Add demo mode with restricted user actions

This commit is contained in:
Maksim Eltyshev
2026-01-14 14:11:21 +01:00
parent 5636c2bb79
commit 1f4f439f4c
9 changed files with 19 additions and 5 deletions
+3 -1
View File
@@ -53,7 +53,9 @@ module.exports = {
const isDefaultAdmin = inputs.record.email === sails.config.custom.defaultAdminEmail;
const lockedFieldNames = [];
if (isDefaultAdmin || inputs.record.isSsoUser) {
if (sails.config.custom.demoMode) {
lockedFieldNames.push('email', 'password', 'role', 'name', 'username');
} else if (isDefaultAdmin || inputs.record.isSsoUser) {
lockedFieldNames.push('email', 'password', 'name');
if (isDefaultAdmin) {