Add demo role
This commit is contained in:
1 parent
7c81259e19
commit
63da8bd571
2 files changed
+2
-2
No files matched your search
@@ -38,7 +38,7 @@ const UserSchema = mongoose.Schema(
|
|||||||
role: {
|
role: {
|
||||||
type: [String],
|
type: [String],
|
||||||
default: "user",
|
default: "user",
|
||||||
enum: ["user", "admin", "superadmin"],
|
enum: ["user", "admin", "superadmin", "demo"],
|
||||||
},
|
},
|
||||||
teamId: {
|
teamId: {
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const registrationBodyValidation = joi.object({
|
|||||||
profileImage: joi.any(),
|
profileImage: joi.any(),
|
||||||
role: joi
|
role: joi
|
||||||
.array()
|
.array()
|
||||||
.items(joi.string().valid("superadmin", "admin", "user"))
|
.items(joi.string().valid("superadmin", "admin", "user", "demo"))
|
||||||
.min(1)
|
.min(1)
|
||||||
.required(),
|
.required(),
|
||||||
teamId: joi.string().allow("").required(),
|
teamId: joi.string().allow("").required(),
|
||||||
|
|||||||
Reference in new issue
Block a user