Stage hide integrations tab for "Viewer" role
@@ -42,6 +42,9 @@ const GuardedProjectSettings = fakeGuardedRoute("settings", "", [
const GuardedIntegrations = fakeGuardedRoute("integrations", "", [
"get",
"list",
+ "update",
+ "create",
+ "delete",
])(Integrations);
type PropsType = RouteComponentProps &
@@ -430,6 +430,10 @@ class ExpandedJobChart extends Component<PropsType, StateType> {
/>
);
+ if (!this.props.isAuthorized("job", "", ["get", "update", "create"])) {
+ saveButton = null;
+ }
+
switch (currentTab) {
case "jobs":
if (this.state.imageIsPlaceholder) {
@@ -234,7 +234,12 @@ class Sidebar extends Component<PropsType, StateType> {
Launch
</NavButton>
- {this.props.isAuthorized("integrations", "", ["get"]) && (
+ {this.props.isAuthorized("integrations", "", [
+ "get",
+ ]) && (
<NavButton
selected={currentView === "integrations"}
onClick={() =>