refactor(account): account delete, truncate, auto note removal
This commit is contained in:
parent
4e99008e8d
commit
d84bff37ec
17 changed files with 387 additions and 260 deletions
|
@ -40,6 +40,9 @@ export type RolePolicies = {
|
|||
canCreateContent: boolean;
|
||||
canUpdateContent: boolean;
|
||||
canDeleteContent: boolean;
|
||||
canUseAutoNoteRemoval: boolean;
|
||||
canUseAccountRemoval: boolean;
|
||||
canUseAccountTruncate: boolean;
|
||||
canPurgeAccount: boolean;
|
||||
canUpdateAvatar: boolean;
|
||||
canUpdateBanner: boolean;
|
||||
|
@ -69,7 +72,6 @@ export type RolePolicies = {
|
|||
userEachUserListsLimit: number;
|
||||
rateLimitFactor: number;
|
||||
avatarDecorationLimit: number;
|
||||
canUseAccountRemoval: boolean;
|
||||
mutualLinkSectionLimit: number;
|
||||
mutualLinkLimit: number;
|
||||
};
|
||||
|
@ -82,6 +84,9 @@ export const DEFAULT_POLICIES: RolePolicies = {
|
|||
canCreateContent: true,
|
||||
canUpdateContent: true,
|
||||
canDeleteContent: true,
|
||||
canUseAutoNoteRemoval: true,
|
||||
canUseAccountRemoval: true,
|
||||
canUseAccountTruncate: true,
|
||||
canPurgeAccount: true,
|
||||
canUpdateAvatar: true,
|
||||
canUpdateBanner: true,
|
||||
|
@ -111,7 +116,6 @@ export const DEFAULT_POLICIES: RolePolicies = {
|
|||
userEachUserListsLimit: 50,
|
||||
rateLimitFactor: 1,
|
||||
avatarDecorationLimit: 1,
|
||||
canUseAccountRemoval: true,
|
||||
mutualLinkSectionLimit: 1,
|
||||
mutualLinkLimit: 3,
|
||||
};
|
||||
|
@ -397,7 +401,9 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit {
|
|||
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)),
|
||||
canUseAutoNoteRemoval: calc('canUseAutoNoteRemoval', vs => vs.some(v => v === true)),
|
||||
canUseAccountRemoval: calc('canUseAccountRemoval', vs => vs.some(v => v === true)),
|
||||
canUseAccountTruncate: calc('canUseAccountTruncate', vs => vs.some(v => v === true)),
|
||||
canPurgeAccount: calc('canPurgeAccount', vs => vs.some(v => v === true)),
|
||||
canUpdateAvatar: calc('canUpdateAvatar', vs => vs.some(v => v === true)),
|
||||
canUpdateBanner: calc('canUpdateBanner', vs => vs.some(v => v === true)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue