カスタム絵文字の管理を権限を持つユーザーが行えるように

Resolve #9542
This commit is contained in:
syuilo
2023-01-13 14:58:27 +09:00
parent 0a6e237d09
commit b250456814
21 changed files with 55 additions and 16 deletions

View File

@@ -17,6 +17,7 @@ export type RoleOptions = {
ltlAvailable: boolean;
canPublicNote: boolean;
canInvite: boolean;
canManageCustomEmojis: boolean;
driveCapacityMb: number;
antennaLimit: number;
};
@@ -26,6 +27,7 @@ export const DEFAULT_ROLE: RoleOptions = {
ltlAvailable: true,
canPublicNote: true,
canInvite: false,
canManageCustomEmojis: false,
driveCapacityMb: 100,
antennaLimit: 5,
};
@@ -182,6 +184,7 @@ export class RoleService implements OnApplicationShutdown {
ltlAvailable: getOptionValues('ltlAvailable').some(x => x === true),
canPublicNote: getOptionValues('canPublicNote').some(x => x === true),
canInvite: getOptionValues('canInvite').some(x => x === true),
canManageCustomEmojis: getOptionValues('canManageCustomEmojis').some(x => x === true),
driveCapacityMb: Math.max(...getOptionValues('driveCapacityMb')),
antennaLimit: Math.max(...getOptionValues('antennaLimit')),
};