Merge pull request #412 from dalcde/perm

Fix default permission
This commit is contained in:
Sheogorath 2020-06-20 14:57:33 +02:00 committed by GitHub
commit 77fbfa33a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,7 +170,7 @@ export class Note extends Model<Note> {
}
// if no permission specified and have owner then give default permission in config, else default permission is freely
if (!note.permission) {
if (note.owner) {
if (note.ownerId) {
// TODO: Might explode if the user-defined permission does not exist
note.permission = PermissionEnum[config.defaultPermission]
} else {