mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
@@ -5,12 +5,30 @@
|
||||
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||||
*/
|
||||
|
||||
const Roles = {
|
||||
EDITOR: 'editor',
|
||||
VIEWER: 'viewer',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
Roles,
|
||||
|
||||
attributes: {
|
||||
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||||
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||||
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||||
|
||||
role: {
|
||||
type: 'string',
|
||||
isIn: Object.values(Roles),
|
||||
required: true,
|
||||
},
|
||||
canComment: {
|
||||
type: 'boolean',
|
||||
allowNull: true,
|
||||
columnName: 'can_comment',
|
||||
},
|
||||
|
||||
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||||
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||||
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||||
|
||||
Reference in New Issue
Block a user