File tree 2 files changed +11
-4
lines changed
static/app/views/settings
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ const organizationNavigation: NavigationSection[] = [
30
30
{
31
31
path : `${ pathPrefix } /members/` ,
32
32
title : t ( 'Members' ) ,
33
- show : ( { access} ) => access ! . has ( 'member:read' ) ,
34
33
description : t ( 'Manage user membership for an organization' ) ,
35
34
id : 'members' ,
36
35
} ,
@@ -64,8 +63,7 @@ const organizationNavigation: NavigationSection[] = [
64
63
{
65
64
path : `${ pathPrefix } /rate-limits/` ,
66
65
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' ) ,
69
67
description : t ( 'Configure rate limits for all projects in the organization' ) ,
70
68
id : 'rate-limits' ,
71
69
} ,
Original file line number Diff line number Diff line change 1
1
import withOrganization from 'sentry/utils/withOrganization' ;
2
+ import PermissionAlert from 'sentry/views/settings/organization/permissionAlert' ;
2
3
3
4
import OrganizationRateLimits from './organizationRateLimits' ;
4
5
5
6
function OrganizationRateLimitsContainer (
6
7
props : React . ComponentProps < typeof OrganizationRateLimits >
7
8
) {
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
+ ) ;
9
18
}
10
19
11
20
export default withOrganization ( OrganizationRateLimitsContainer ) ;
You can’t perform that action at this time.
0 commit comments