NoteEditServiceでもポリシーチェックをするように
This commit is contained in:
parent
a49bd3891e
commit
c7eae918f9
|
@ -146,9 +146,9 @@ export class NoteEditService implements OnApplicationShutdown {
|
||||||
throw new Error('No such note');
|
throw new Error('No such note');
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ((await this.roleService.getUserPolicies(user.id)).canEditNote !== true) {
|
if ((await this.roleService.getUserPolicies(user.id)).canEditNote !== true) {
|
||||||
// throw new Error('Not allow edit note');
|
throw new Error('Edit note is not allowed');
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (data.reply == null) data.reply = targetNote.reply;
|
if (data.reply == null) data.reply = targetNote.reply;
|
||||||
if (data.channel == null) data.channel = targetNote.channel;
|
if (data.channel == null) data.channel = targetNote.channel;
|
||||||
|
|
Loading…
Reference in New Issue