fix: read permission; incorrect name; redirect (#5541)

This commit is contained in:
伍闲犬
2025-08-26 17:57:59 +08:00
committed by GitHub
parent 93e9cb675d
commit 3fb1ff2614
3 changed files with 9 additions and 9 deletions

View File

@@ -88,13 +88,6 @@ export const authAppByTmbId = async ({
};
}
if (app.favourite || app.quick) {
return {
...app,
permission: new AppPermission({ isOwner: false, role: ReadRoleVal })
};
}
const isOwner = tmbPer.isOwner || String(app.tmbId) === String(tmbId);
const { Per } = await (async () => {
@@ -119,6 +112,11 @@ export const authAppByTmbId = async ({
resourceType: PerResourceTypeEnum.app
});
const Per = new AppPermission({ role, isOwner });
if (app.favourite || app.quick) {
Per.addRole(ReadRoleVal);
}
return {
Per
};