Merge tag '2023.12.1' into merge-upstream

This commit is contained in:
riku6460 2023-12-28 03:58:07 +09:00
commit 018ff4cbda
No known key found for this signature in database
GPG key ID: 27414FA27DB94CF6
336 changed files with 1938 additions and 1116 deletions

View file

@ -331,7 +331,8 @@ export class ApiCallService implements OnApplicationShutdown {
}
}
if (token && ep.meta.kind && !token.permission.some(p => p === ep.meta.kind)) {
if (token && ((ep.meta.kind && !token.permission.some(p => p === ep.meta.kind))
|| (!ep.meta.kind && (ep.meta.requireCredential || ep.meta.requireModerator || ep.meta.requireAdmin)))) {
throw new ApiError({
message: 'Your app does not have the necessary permissions to use this endpoint.',
code: 'PERMISSION_DENIED',