mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Don't allow list modifier in role name
This commit is contained in:
parent
76c64b8ac4
commit
bd73e1892a
@ -10,6 +10,7 @@ create_role_schema = {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": r"^[^,\[\]]*$",
|
||||
},
|
||||
"servers": {
|
||||
"type": "array",
|
||||
@ -22,7 +23,7 @@ create_role_schema = {
|
||||
},
|
||||
"permissions": {
|
||||
"type": "string",
|
||||
"pattern": "^[01]{8}$", # 8 bits, see EnumPermissionsServer
|
||||
"pattern": r"^[01]{8}$", # 8 bits, see EnumPermissionsServer
|
||||
},
|
||||
},
|
||||
"required": ["server_id", "permissions"],
|
||||
|
@ -9,6 +9,7 @@ modify_role_schema = {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"pattern": r"^[^,\[\]]*$",
|
||||
},
|
||||
"servers": {
|
||||
"type": "array",
|
||||
@ -21,7 +22,7 @@ modify_role_schema = {
|
||||
},
|
||||
"permissions": {
|
||||
"type": "string",
|
||||
"pattern": "^[01]{8}$", # 8 bits, see EnumPermissionsServer
|
||||
"pattern": r"^[01]{8}$", # 8 bits, see EnumPermissionsServer
|
||||
},
|
||||
},
|
||||
"required": ["server_id", "permissions"],
|
||||
|
Loading…
Reference in New Issue
Block a user