feat: fix admin role (#1527)

This commit is contained in:
Archer 2024-05-18 13:32:50 +08:00 committed by GitHub
parent ba517b6a73
commit fd31a0b763
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ export async function authApp({
return Promise.reject(AppErrEnum.unExist);
}
const isOwner = String(app.tmbId) === tmbId;
const isOwner = String(app.tmbId) === tmbId || role === TeamMemberRoleEnum.owner;
const canWrite =
isOwner ||
(app.permission === PermissionTypeEnum.public && role !== TeamMemberRoleEnum.visitor);