mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
F OpenNebula/one#6331: Disable change owner & group UI (#2754)
This commit is contained in:
parent
598e0bc91c
commit
a8b1e4ca5a
@ -229,6 +229,8 @@ const Actions = () => {
|
||||
selected: true,
|
||||
color: 'secondary',
|
||||
dataCy: 'marketapp-ownership',
|
||||
disabled: (rows) =>
|
||||
rows.some(({ original }) => original?.MARKETPLACE_ID === '0'),
|
||||
options: [
|
||||
{
|
||||
accessor: MARKETPLACE_APP_ACTIONS.CHANGE_OWNER,
|
||||
|
@ -61,7 +61,8 @@ const MarketplaceAppInfoTab = ({ tabProps = {}, id }) => {
|
||||
const [changePermissions] = useChangeAppPermissionsMutation()
|
||||
const [updateTemplate] = useUpdateAppMutation()
|
||||
const { data: app = {} } = useGetMarketplaceAppQuery({ id })
|
||||
const { UNAME, UID, GNAME, GID, PERMISSIONS, TEMPLATE } = app
|
||||
const { UNAME, UID, GNAME, GID, PERMISSIONS, MARKETPLACE_ID, TEMPLATE } = app
|
||||
const isPublic = (MARKETID) => MARKETID === 0
|
||||
|
||||
const handleChangeOwnership = async (newOwnership) => {
|
||||
await changeOwnership({ id, ...newOwnership })
|
||||
@ -116,7 +117,7 @@ const MarketplaceAppInfoTab = ({ tabProps = {}, id }) => {
|
||||
handleEdit={handleChangePermission}
|
||||
/>
|
||||
)}
|
||||
{ownershipPanel?.enabled && (
|
||||
{ownershipPanel?.enabled && !isPublic(MARKETPLACE_ID) && (
|
||||
<Ownership
|
||||
actions={getActions(ownershipPanel?.actions)}
|
||||
userId={UID}
|
||||
|
Loading…
x
Reference in New Issue
Block a user