Skip to content
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

fix(repositories-settings): Disable UI components in case of no permission - [ISSUE-1329] #29598

Merged

Conversation

priscilawebdev
Copy link
Member

@priscilawebdev priscilawebdev commented Oct 27, 2021

If the user has no "project edit" permission, a couple of buttons in the UI have to be disabled and provide a message to the user saying that he has no permission.

Preview:

image

image

image

image

ps:

  • backend team will update the validation endpoint /projects/${orgSlug}/${project.slug}/appstoreconnect/validate/${appStoreConnectSymbolSourceId}/ so we the UI will be able to expose all non-sensitive app store connect data to all users independently of the user role. When this happens the "placeholder" component won't load forever

  • Since the refresh credentials (App store connect) code will be soon removed, I did not touch it in this PR

  • In this part of the UI I am facing the same issue that this PR tries to solve fix(ui): Un-disable buttons for hover event propagation #29413

@priscilawebdev priscilawebdev changed the title fix(app-store-connect): Disable UI components in case of no permission fix(custom-repositories): Disable UI components in case of no permission Oct 27, 2021
<Access access={['project:write']}>
{({hasAccess}) => (
<Fragment>
<ButtonTooltip
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button component has the title prop that could have been used, but due to an issue, wrapping the Button component with the Tooltip component was a better solution.

@priscilawebdev priscilawebdev requested review from relaxolotl, flub and a team October 27, 2021 13:59
@priscilawebdev priscilawebdev enabled auto-merge (squash) October 27, 2021 14:41
@priscilawebdev priscilawebdev changed the title fix(custom-repositories): Disable UI components in case of no permission fix(repositories-settings): Disable UI components in case of no permission Oct 27, 2021
@priscilawebdev priscilawebdev changed the title fix(repositories-settings): Disable UI components in case of no permission fix(repositories-settings): Disable UI components in case of no permission - [ISSUE-1329] Oct 27, 2021
@priscilawebdev priscilawebdev merged commit a36ac8e into master Oct 27, 2021
@priscilawebdev priscilawebdev deleted the fix/app-store-connect-action-buttons-permission branch October 27, 2021 15:26
@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants