Skip to content

Commit

Permalink
fix: only owner or team owner can change app's owner (#3033)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinleyGe authored Oct 30, 2024
1 parent 9219903 commit e788bca
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions projects/app/src/pages/app/list/components/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,13 @@ const ListItem = () => {
)}
{!!editPerApp && (
<ConfigPerModal
onChangeOwner={(tmbId: string) =>
changeOwner({
appId: editPerApp._id,
ownerId: tmbId
}).then(() => loadMyApps())
}
{...(editPerApp.permission.isOwner && {
onChangeOwner: (tmbId: string) =>
changeOwner({
appId: editPerApp._id,
ownerId: tmbId
}).then(() => loadMyApps())
})}
refetchResource={loadMyApps}
hasParent={Boolean(parentId)}
resumeInheritPermission={onResumeInheritPermission}
Expand Down

0 comments on commit e788bca

Please sign in to comment.