Skip to content

Commit 9af303c

Browse files
authored
feat(sidebar): Always show all tabs in the Organization Settings view (Part 2) (#65625)
* Removed show prop so tabs are always shown regardless of access * Continuation of getsentry/getsentry#13022 Rate-limit page <img width="948" alt="image" src="https://github.com/getsentry/sentry/assets/33237075/f9650136-16c2-4b6f-b969-deddb0a7e5c0">
1 parent bf85769 commit 9af303c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

static/app/views/settings/organization/navigationConfiguration.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const organizationNavigation: NavigationSection[] = [
3030
{
3131
path: `${pathPrefix}/members/`,
3232
title: t('Members'),
33-
show: ({access}) => access!.has('member:read'),
3433
description: t('Manage user membership for an organization'),
3534
id: 'members',
3635
},
@@ -64,8 +63,7 @@ const organizationNavigation: NavigationSection[] = [
6463
{
6564
path: `${pathPrefix}/rate-limits/`,
6665
title: t('Rate Limits'),
67-
show: ({access, features}) =>
68-
features!.has('legacy-rate-limits') && access!.has('org:write'),
66+
show: ({features}) => features!.has('legacy-rate-limits'),
6967
description: t('Configure rate limits for all projects in the organization'),
7068
id: 'rate-limits',
7169
},
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
import withOrganization from 'sentry/utils/withOrganization';
2+
import PermissionAlert from 'sentry/views/settings/organization/permissionAlert';
23

34
import OrganizationRateLimits from './organizationRateLimits';
45

56
function OrganizationRateLimitsContainer(
67
props: React.ComponentProps<typeof OrganizationRateLimits>
78
) {
8-
return !props.organization ? null : <OrganizationRateLimits {...props} />;
9+
if (!props.organization) {
10+
return null;
11+
}
12+
13+
return props.organization.access.includes('org:write') ? (
14+
<OrganizationRateLimits {...props} />
15+
) : (
16+
<PermissionAlert />
17+
);
918
}
1019

1120
export default withOrganization(OrganizationRateLimitsContainer);

0 commit comments

Comments
 (0)