-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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">
- Loading branch information
1 parent
bf85769
commit 9af303c
Showing
2 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import withOrganization from 'sentry/utils/withOrganization'; | ||
import PermissionAlert from 'sentry/views/settings/organization/permissionAlert'; | ||
|
||
import OrganizationRateLimits from './organizationRateLimits'; | ||
|
||
function OrganizationRateLimitsContainer( | ||
props: React.ComponentProps<typeof OrganizationRateLimits> | ||
) { | ||
return !props.organization ? null : <OrganizationRateLimits {...props} />; | ||
if (!props.organization) { | ||
return null; | ||
} | ||
|
||
return props.organization.access.includes('org:write') ? ( | ||
<OrganizationRateLimits {...props} /> | ||
) : ( | ||
<PermissionAlert /> | ||
); | ||
} | ||
|
||
export default withOrganization(OrganizationRateLimitsContainer); |