diff --git a/frontend/src/modules/Dashboards/views/DashboardView.js b/frontend/src/modules/Dashboards/views/DashboardView.js
index 03abaa021..d093546e7 100644
--- a/frontend/src/modules/Dashboards/views/DashboardView.js
+++ b/frontend/src/modules/Dashboards/views/DashboardView.js
@@ -227,16 +227,18 @@ const DashboardView = () => {
onClick={() => upVoteDashboard(dashboard.dashboardUri)}
upVotes={upVotes || 0}
/>
- }
- sx={{ mt: 1, mr: 1 }}
- onClick={() => setOpenFeed(true)}
- type="button"
- variant="outlined"
- >
- Chat
-
+ {isAdmin && (
+ }
+ sx={{ mt: 1, mr: 1 }}
+ onClick={() => setOpenFeed(true)}
+ type="button"
+ variant="outlined"
+ >
+ Chat
+
+ )}
+ {isAdmin && (
+ }
+ sx={{ mt: 1, mr: 1 }}
+ onClick={() => setOpenFeed(true)}
+ type="button"
+ variant="outlined"
+ >
+ Chat
+
+ )}
{
const dispatch = useDispatch();
@@ -134,6 +137,7 @@ const PipelineView = () => {
{ label: 'Tags', value: 'tags', icon: },
{ label: 'Stack', value: 'stack', icon: }
];
+ const [isAdmin, setIsAdmin] = useState(false);
const handleDeleteObjectModalOpen = () => {
setIsDeleteObjectModalOpen(true);
@@ -148,6 +152,11 @@ const PipelineView = () => {
const response = await client.query(getDataPipeline(params.uri));
if (!response.errors && response.data.getDataPipeline !== null) {
setPipeline(response.data.getDataPipeline);
+ setIsAdmin(
+ ['Creator', 'Admin', 'Owner'].indexOf(
+ response.data.getDataPipeline.userRoleForPipeline
+ ) !== -1
+ );
} else {
const error = response.errors
? response.errors[0].message
@@ -212,6 +221,7 @@ const PipelineView = () => {