-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add permission check for Insights page and don't show it in the menu for non-owners #20593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…for non-owners Tool: gitpod/catfood.gitpod.cloud
@@ -71,7 +75,11 @@ export const Insights = () => { | |||
|
|||
{errorMessage && ( | |||
<Alert type="error" className="mt-4"> | |||
{errorMessage instanceof Error ? errorMessage.message : "An error occurred."} | |||
{isLackingPermissions | |||
? "You don't have permission to access this organization's insights." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? "You don't have permission to access this organization's insights." | |
? "You don't have `owner` permission to access this organization's insights." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioning the role makes this information for tangible and actionable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great! Gave it a bit more formatting pizzaz to match other places in the dashboard and pushed as b0f3011
(#20593).

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a copy suggestion, otherwise LGTM ✔️
Co-authored-by: Gero Posmyk-Leinemann <[email protected]> Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Description
Related Issue(s)
Fixes CLC-1141
How to test
https://ft-insightb31360f5bd.preview.gitpod-dev.com/insights
/hold