-
Notifications
You must be signed in to change notification settings - Fork 44
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
Allow project users to manage collections #2898
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2898 +/- ##
==========================================
+ Coverage 91.45% 91.47% +0.01%
==========================================
Files 343 341 -2
Lines 12371 12360 -11
==========================================
- Hits 11314 11306 -8
+ Misses 1057 1054 -3 ☔ View full report in Codecov by Sentry. |
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.
Nicely done Frank! I have left one request that would help users on knowing the naming requirements to prevent a try-and-error repetition situation.
defp validate_changeset(changeset) do | ||
changeset | ||
|> validate_format(:name, ~r/^[a-z0-9]+([\-_.][a-z0-9]+)*$/, | ||
message: "Collection name must be URL safe" |
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.
It would be helpful for the users to know the exact rule. Something like only digits, letters and the separating symbols '-', '_' or '.'
for {conn, _user} <- | ||
setup_project_users(conn, project, [:owner, :admin, :editor]) do |
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.
This is a nice coverage but would you mind moving to a separate test case for the different groups of users? One test, the current one would be left for the viewers, and another one would be created for different expected result contemplating this second group of users.
Description
This PR allows project users to view, create, edit and delete collections.
Only users with
edit
access cancreate, edit and delete
collectionsThis PR also removes the interface from the superadmin side
Closes #2838
Validation steps
collections
tab just after credentialsWhen you login as a
viewer
, all the action buttons are greyed outAI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Pre-submission checklist
:owner
,:admin
,:editor
,:viewer
)