Commit e788bcaa by Finley Ge Committed by GitHub

fix: only owner or team owner can change app's owner (#3033)

parent 92199033
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment