Fix: #2590 not allow users (even if they own the entity) to update lineage without the "Update Lineage" permission. (#2648)

This commit is contained in:
Sachin Chaurasiya 2022-02-07 13:18:08 +05:30 committed by GitHub
parent 888e225544
commit e38963d7c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,6 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
addLineageHandler,
removeLineageHandler,
entityLineageHandler,
isOwner,
}: EntityLineageProp) => {
const showToast = useToastContext();
const { userPermissions, isAuthDisabled, isAdminUser } = useAuth();
@ -670,7 +669,6 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
<p>You do not have permission to edit the lineage</p>
</>
}
isOwner={isOwner}
permission={Operation.UpdateLineage}>
<ControlButton
className={classNames(
@ -683,8 +681,7 @@ const Entitylineage: FunctionComponent<EntityLineageProp> = ({
'tw-opacity-40':
!userPermissions[Operation.UpdateLineage] &&
!isAuthDisabled &&
!isAdminUser &&
!isOwner,
!isAdminUser,
}
)}
onClick={() => {