feat: Add demo mode with restricted user actions
This commit is contained in:
@@ -134,7 +134,11 @@ module.exports = {
|
||||
throw Errors.USER_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (user.email === sails.config.custom.defaultAdminEmail || user.isSsoUser) {
|
||||
if (
|
||||
user.email === sails.config.custom.defaultAdminEmail ||
|
||||
user.isSsoUser ||
|
||||
sails.config.custom.demoMode
|
||||
) {
|
||||
throw Errors.NOT_ENOUGH_RIGHTS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user