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: should only require CREATE_ADDON when creating addon #2204

Merged
merged 3 commits into from
Oct 18, 2022

Conversation

ivarconr
Copy link
Member

fixes: #2203

@vercel
Copy link

vercel bot commented Oct 18, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview Oct 18, 2022 at 2:00PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
unleash-docs ⬜️ Ignored (Inspect) Oct 18, 2022 at 2:00PM (UTC)

@@ -334,7 +334,7 @@ export const AddonForm: VFC<IAddonFormProps> = ({
type="submit"
color="primary"
variant="contained"
permission={ADMIN}
permission={editMode ? 'UPDATE_ADDON' : 'CREATE_ADDON'}
Copy link
Member

Choose a reason for hiding this comment

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

You can switch the import to grab the CREATE_ADDON and UPDATE_ADDON constants instead, so we don't have to use string literals:
image

Copy link
Member Author

Choose a reason for hiding this comment

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

will do!

Copy link
Member

@nunogois nunogois left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

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

LGTM!

@ivarconr ivarconr marked this pull request as ready for review October 18, 2022 17:57
@ivarconr ivarconr merged commit bd4e648 into main Oct 18, 2022
@ivarconr ivarconr deleted the fix/ui-create-addon-permission branch October 18, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Bug: Cannot create addon as an Editor
3 participants