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

feat: update dependency permission #4910

Merged
merged 6 commits into from
Oct 4, 2023
Merged

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Oct 2, 2023

About the changes

  • adding new project level permission for updating dependencies (adding, editing, removing) called "Update feature dependency"
  • project owner and members are given this by default
Screenshot 2023-10-02 at 15 46 45

Add without permission

Screenshot 2023-10-02 at 15 48 07

Add with permission (had to remove plus icon since it breaks the without permission state with lock - only one icon is possible)

Screenshot 2023-10-02 at 15 47 50

Edit/delete without permission:

Screenshot 2023-10-02 at 15 47 14

Edit/delete with permission:

Screenshot 2023-10-02 at 15 47 42

Important files

Discussion points

@vercel
Copy link

vercel bot commented Oct 2, 2023

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

Name Status Preview Comments Updated (UTC)
unleash-docs ❌ Failed (Inspect) Oct 3, 2023 6:16am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 6:16am

@@ -30,14 +32,16 @@ export const DependencyRow: FC<{ feature: IFeatureToggle }> = ({ feature }) => {
<FlexRow>
<StyledDetail>
<StyledLabel>Dependency:</StyledLabel>
<Button
startIcon={<Add />}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

startIcon was breaking permission button disabled state

@@ -1,6 +1,7 @@
export const ADMIN = 'ADMIN';
export const CREATE_FEATURE = 'CREATE_FEATURE';
export const UPDATE_FEATURE = 'UPDATE_FEATURE';
export const UPDATE_DEPENDENCY = 'UPDATE_DEPENDENCY';
Copy link
Member

Choose a reason for hiding this comment

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

can we call it UPDATE_FEATURE_DEPENDENCY?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, updating across all files to keep it consistent.

Comment on lines +5 to +6
SELECT assign_unleash_permission_to_role('UPDATE_FEATURE_DEPENDENCY', 'Member');
SELECT assign_unleash_permission_to_role('UPDATE_FEATURE_DEPENDENCY', 'Owner');
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, I didn't know you could do this

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

LGTM

@kwasniew kwasniew merged commit 296cc9a into main Oct 4, 2023
13 of 17 checks passed
@kwasniew kwasniew deleted the update-dependency-permission branch October 4, 2023 07:27
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.

None yet

3 participants