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(ui): let UI delete manifests if current user has permissions to … #2132

Merged

Conversation

eusebiu-constantin-petu-dbk
Copy link
Collaborator

…do so

  • RepoMeta now contains a new bool field which tells UI if the user has delete permission on that specific repo
  • apply cors on DeleteManifest route

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

pkg/extensions/search/convert/metadb.go Outdated Show resolved Hide resolved
pkg/meta/proto/meta/meta.proto Outdated Show resolved Hide resolved
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the ui_delete_tag branch 4 times, most recently from b4af79c to 8b17989 Compare December 12, 2023 11:33
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (86b0a22) 92.08% compared to head (e386aa8) 92.08%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2132   +/-   ##
=======================================
  Coverage   92.08%   92.08%           
=======================================
  Files         165      165           
  Lines       28681    28688    +7     
=======================================
+ Hits        26410    26417    +7     
  Misses       1675     1675           
  Partials      596      596           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/meta/boltdb/boltdb.go Outdated Show resolved Hide resolved
@eusebiu-constantin-petu-dbk eusebiu-constantin-petu-dbk force-pushed the ui_delete_tag branch 4 times, most recently from b36115b to 0578ff3 Compare December 13, 2023 15:46
@@ -246,10 +246,14 @@ func RepoIsUserAvailable(ctx context.Context, repoName string) (bool, error) {
return false, err
}

// no authn/authz enabled on server
if uac == nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is not reachable anymore, uac can not be nil

…do so

- added a new field 'IsDeletable' for graphql ImageSummary struct.
- apply cors on DeleteManifest route

Signed-off-by: Petu Eusebiu <[email protected]>
@rchincha rchincha merged commit dbb1c35 into project-zot:main Dec 13, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants