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

5122 fix user can create shipment from requisition without permission set #6231

Merged

Conversation

noel-yeldos
Copy link
Contributor

Fixes #5122

πŸ‘©πŸ»β€πŸ’» What does this PR do?

Disable the creation of shipments from requisitions for users who do not have the create invoice permission set. Thanks @lache-melvin for pointing me in the right direction!

Screenshot 2025-01-22 at 11 56 42 AM
Screen.Recording.2025-01-22.at.11.57.47.AM.mov

πŸ’Œ Any notes for the reviewer?

This change makes it so that users who do not have the "create invoice" permission cannot create invoices from the requisition. However, there is a "create customer invoice from requisition" permission in OG that hasn't been mapped yet to OMS. Therefore, if you leave "create customer invoice from requisition" unchecked, you can still create shipments from requisitions if you have "create invoice" permission. @mark-prins worth doing the mapping?

πŸ§ͺ Testing

  • Create User1 and give it permission to View Requisitions and Edit requisitions. Do not give 'Create invoice' permission
  • Go to a Remote site>Distribution> Requisitions and choose a Requisition to supply
  • Click on the button 'Supply requested'
  • Click on button 'Create Shipment'
  • Observe message that lets the user know they do not have permission to create shipment

πŸ“ƒ Documentation

  • Part of an epic: documentation will be completed for the feature as a whole
  • No documentation required: no user facing changes or a bug fix which isn't a change in behaviour
  • These areas should be updated or checked:
    1.
    2.

@github-actions github-actions bot added this to the v2.6.0 milestone Jan 21, 2025
@github-actions github-actions bot added bug Something is borken back-end Back-end related Severity: Low Bugs that don't block workflows. UX like wrong fonts, bad layout Team Korimako labels Jan 21, 2025
Copy link

github-actions bot commented Jan 21, 2025

Bundle size difference

Comparing this PR to main

Old size New size Diff
5.21 MB 5.21 MB 490 B (0.01%)

Copy link
Contributor

@lache-melvin lache-melvin left a comment

Choose a reason for hiding this comment

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

LGTM - but before I approve, keen to hear from @mark-prins whether we want the granularity of mapping the create invoices from requisitions permission through instead

@mark-prins
Copy link
Collaborator

Actually - OG does not check the create invoice permission when creating invoices from a requisition!
That's checking for both the Transfer goods between stores and Create invoices from requisitions permissions to be set.

I would prefer to bring through the Create invoices from requisitions permission and use that. Only that though as this gives the greatest flexibility - it means that a user can be denied the permission to create invoices manually while still being about to fulfil customer requisitions. It does require setting two permissions for those users who do both, but that's ok

@noel-yeldos
Copy link
Contributor Author

@mark-prins @lache-melvin What should be done here? Should I do the mapping in this PR or create an enhancement issue?

@lache-melvin
Copy link
Contributor

Update in this PR please πŸ™

Copy link
Contributor

@lache-melvin lache-melvin left a comment

Choose a reason for hiding this comment

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

Epic thanks for changes!

@noel-yeldos noel-yeldos merged commit 8b288d7 into develop Jan 28, 2025
6 checks passed
@noel-yeldos noel-yeldos deleted the 5122-fix-user-can-create-shipment-without-permission-set branch January 28, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Back-end related bug Something is borken Severity: Low Bugs that don't block workflows. UX like wrong fonts, bad layout Team Korimako
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Requisitions: user can create OS, despite not having 'create invoice' permission
3 participants