mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-10 09:31:24 +00:00
fix #12815: user not able to create ingestion pipeline with isOwner() or matchTeam() conditions (#12852)
* fix ingestion tab not showing issue for user in owner team on service page * worked on comments * worked on comments
This commit is contained in:
parent
a74e5bf217
commit
d2f3d45276
@ -914,8 +914,16 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
|||||||
|
|
||||||
const tabs: TabsProps['items'] = useMemo(() => {
|
const tabs: TabsProps['items'] = useMemo(() => {
|
||||||
const tabs = [];
|
const tabs = [];
|
||||||
const isOwner = AppState.userDetails.id === serviceDetails?.owner?.id;
|
const userOwnsService =
|
||||||
const showIngestionTab = Boolean(isOwner || isAdminUser);
|
AppState.userDetails.id === serviceDetails?.owner?.id;
|
||||||
|
|
||||||
|
const userInOwnerTeam = Boolean(
|
||||||
|
AppState.userDetails.teams?.some(
|
||||||
|
(team) => team.id === serviceDetails?.owner?.id
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const showIngestionTab = userInOwnerTeam || userOwnsService || isAdminUser;
|
||||||
|
|
||||||
if (serviceCategory !== ServiceCategory.METADATA_SERVICES) {
|
if (serviceCategory !== ServiceCategory.METADATA_SERVICES) {
|
||||||
tabs.push({
|
tabs.push({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user