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 = () => { ...@@ -409,12 +409,13 @@ const ListItem = () => {
)} )}
{!!editPerApp && ( {!!editPerApp && (
<ConfigPerModal <ConfigPerModal
onChangeOwner={(tmbId: string) => {...(editPerApp.permission.isOwner && {
onChangeOwner: (tmbId: string) =>
changeOwner({ changeOwner({
appId: editPerApp._id, appId: editPerApp._id,
ownerId: tmbId ownerId: tmbId
}).then(() => loadMyApps()) }).then(() => loadMyApps())
} })}
refetchResource={loadMyApps} refetchResource={loadMyApps}
hasParent={Boolean(parentId)} hasParent={Boolean(parentId)}
resumeInheritPermission={onResumeInheritPermission} 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