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
+1 -1
View File
@@ -244,7 +244,7 @@ module.exports = {
}
// TODO: refactor
if (user.email === sails.config.custom.defaultAdminEmail) {
if (user.email === sails.config.custom.defaultAdminEmail || sails.config.custom.demoMode) {
if (inputs.role || inputs.name) {
throw Errors.NOT_ENOUGH_RIGHTS;
}