mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
feat(server): allow to set default role in page (#9963)
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user