feat(server): allow to set default role in page (#9963)

This commit is contained in:
Brooooooklyn
2025-02-06 17:18:50 +00:00
parent f309f8f3e1
commit 41107eafae
9 changed files with 470 additions and 67 deletions

View File

@@ -470,6 +470,10 @@ export const USER_FRIENDLY_ERRORS = {
type: 'action_forbidden',
message: 'A Team workspace is required to perform this action.',
},
page_default_role_can_not_be_owner: {
type: 'invalid_input',
message: 'Page default role can not be owner.',
},
// Subscription Errors
unsupported_subscription_plan: {

View File

@@ -405,6 +405,12 @@ export class ActionForbiddenOnNonTeamWorkspace extends UserFriendlyError {
super('action_forbidden', 'action_forbidden_on_non_team_workspace', message);
}
}
export class PageDefaultRoleCanNotBeOwner extends UserFriendlyError {
constructor(message?: string) {
super('invalid_input', 'page_default_role_can_not_be_owner', message);
}
}
@ObjectType()
class UnsupportedSubscriptionPlanDataType {
@Field() plan!: string
@@ -761,6 +767,7 @@ export enum ErrorNames {
FAILED_TO_SAVE_UPDATES,
FAILED_TO_UPSERT_SNAPSHOT,
ACTION_FORBIDDEN_ON_NON_TEAM_WORKSPACE,
PAGE_DEFAULT_ROLE_CAN_NOT_BE_OWNER,
UNSUPPORTED_SUBSCRIPTION_PLAN,
FAILED_TO_CHECKOUT,
INVALID_CHECKOUT_PARAMETERS,