feat: Add demo mode with restricted user actions
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user