mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Add default permission config
This commit is contained in:
parent
a0d16eec23
commit
0a7adaf35d
2 changed files with 6 additions and 2 deletions
|
@ -513,10 +513,10 @@ module.exports = function (sequelize, DataTypes) {
|
|||
}
|
||||
}
|
||||
}
|
||||
// if no permission specified and have owner then give editable permission, else default permission is freely
|
||||
// if no permission specified and have owner then give default permission in config, else default permission is freely
|
||||
if (!note.permission) {
|
||||
if (note.ownerId) {
|
||||
note.permission = "editable";
|
||||
note.permission = config.defaultpermission;
|
||||
} else {
|
||||
note.permission = "freely";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue