Skip to content

Passing more context to permissions and components #616

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xsenyaaax
Copy link

@xsenyaaax xsenyaaax commented Apr 11, 2025

Description

At CESNET we extend record service in the following ways:

  • A community is required when record is created and user has to have a submitter role in that community
  • Publishing and similar operations are always performed via dedicated requests, not direct API calls

In order to do so, we need to extend permission checks so that they not only include record but also create/update data and additional parameters from context.

This pull request:

  • add kwargs to service methods
  • passes the kwargs data and additional context to permission checks

This change is 100% backwards compatible and in RDM does not cause any differences in permission handling. This pull request is also similar to this one in invenio-requests, in which @mesemus provided an explanation.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

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.

1 participant