refactor(server): permission (#10449)

This commit is contained in:
liuyi
2025-03-05 15:57:00 +08:00
committed by GitHub
parent bf7b1646b3
commit 61162c59fc
61 changed files with 2680 additions and 3562 deletions

View File

@@ -419,6 +419,14 @@ export const USER_FRIENDLY_ERRORS = {
args: { spaceId: 'string' },
message: 'Space should have only one owner.',
},
owner_can_not_leave_workspace: {
type: 'action_forbidden',
message: 'Owner can not leave the workspace.',
},
can_not_revoke_yourself: {
type: 'action_forbidden',
message: 'You can not revoke your own permission.',
},
doc_not_found: {
type: 'resource_not_found',
args: { spaceId: 'string', docId: 'string' },