feat: ロールによるメンション、リプライ、引用の制限 (MisskeyIO#478)

This commit is contained in:
kabo2468 2024-02-27 02:51:17 +09:00 committed by GitHub
parent ce98a86c89
commit a9912534fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 55 additions and 4 deletions

View file

@ -36,6 +36,7 @@ export type RolePolicies = {
gtlAvailable: boolean;
ltlAvailable: boolean;
canPublicNote: boolean;
canInitiateConversation: boolean;
canCreateContent: boolean;
canUpdateContent: boolean;
canDeleteContent: boolean;
@ -69,6 +70,7 @@ export const DEFAULT_POLICIES: RolePolicies = {
gtlAvailable: true,
ltlAvailable: true,
canPublicNote: true,
canInitiateConversation: true,
canCreateContent: true,
canUpdateContent: true,
canDeleteContent: true,
@ -338,6 +340,7 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
gtlAvailable: calc('gtlAvailable', vs => vs.some(v => v === true)),
ltlAvailable: calc('ltlAvailable', vs => vs.some(v => v === true)),
canPublicNote: calc('canPublicNote', vs => vs.some(v => v === true)),
canInitiateConversation: calc('canInitiateConversation', vs => vs.some(v => v === true)),
canCreateContent: calc('canCreateContent', vs => vs.some(v => v === true)),
canUpdateContent: calc('canUpdateContent', vs => vs.some(v => v === true)),
canDeleteContent: calc('canDeleteContent', vs => vs.some(v => v === true)),