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

[MODDATAIMP-942] [Poppy] Add missing permissions #309

Closed
wants to merge 10 commits into from

Conversation

ncovercash
Copy link
Member

@ncovercash ncovercash commented Oct 23, 2023

Jira MODDATAIMP-942

Poppy version of #310

Purpose

A couple straggling permissions needed to be added for full DI functionality:

  • Needed for EDITFACT imports with acquisition units (see FAT-1470)
    • invoices.acquisitions-units-assignments.assign
    • invoices.acquisitions-units-assignments.manage

@ncovercash ncovercash marked this pull request as ready for review October 23, 2023 13:21
@@ -68,8 +68,6 @@ invoice-storage.invoices.item.put
invoice-storage.invoice-lines.item.post
invoice-storage.invoice-lines.item.put
invoice-storage.invoice-lines.collection.get
acquisitions-units.units.collection.get
acquisitions-units.memberships.collection.get
Copy link
Member Author

Choose a reason for hiding this comment

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

These were duplicated elsewhere in the file

@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@@ -101,3 +99,6 @@ instance-authority-links.instances.collection.get
instance-authority-links.instances.collection.put
instance-authority.linking-rules.collection.get
user-tenants.collection.get
organizations.organizations.collection.get
invoices.acquisitions-units-assignments.assign
Copy link
Contributor

Choose a reason for hiding this comment

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

it seems that for the data-import system user we should not add this permission as well because data import processes initiated by all other users will be provided with this permission, regardless of whether a user starting the import process has this permission or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure what to do, then, since the data import system user operates on the user's behalf to process jobs. Anything the user can do the system user must be able to do

Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't come to some solution, but might be we can consider approach of saving "X-Okapi-Permissions" header of the initial user along with the DataImportQueueItem (or smth like that) in the DB. This way, the header could be passed further through Kafka headers and be used by the logic that determines whether the user has this specific permission during invoice creation.

@ncovercash
Copy link
Member Author

See #311

@ncovercash ncovercash closed this Oct 27, 2023
@KaterynaSenchenko KaterynaSenchenko deleted the moddataimp-942 branch November 8, 2023 12:55
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.

4 participants