[FE] No permission after creating requisitionless order
Description
Environment
Attachments
- 21 Feb 2025, 11:05 AM
- 21 Feb 2025, 10:54 AM
- 21 Feb 2025, 10:54 AM
- 21 Feb 2025, 10:54 AM
- 28 Jan 2025, 06:57 AM
Checklists
Activity
Dominik NogaFebruary 25, 2025 at 11:15 AM
@Maciej Grochalski i think we can create such a ticket. But this one can be already closed i think? I think i can move it from QA to ‘to be released’, because there is nothing to test here and the bug was fixed.
Maciej GrochalskiFebruary 25, 2025 at 10:52 AM
The error mentioned in the scope of this ticket is indeed not appearing so it is okay @Dominik Noga.
However I would create a ticket to investigate the whole Requisition-less ordering process. There are more errors, which are unclear that come as I mentioned in the comments before.
To access the functionality we need CREATE_ORDERS,
then after we choose program/facility parameters we need one of: ORDERS_VIEW, ORDERS_EDIT, SHIPMENTS_EDIT, SHIPMENTS_VIEW, PODS_VIEW, PODS_MANAGE,
then at the end to add products we need STOCK_CARDS_VIEW.
So the rights needed could be investigated, and possibly improve errors that come from the BE (“You are not authorized to perform this action” is very unclear, in general what is needed is “VIEW_STOCKS_CARD” right, which can be added by admin user, the system could display it instead).
It would be good to take a look at this and have it well documented, maybe in core 3.20, @Artur Lebiedziński what do you think?
Dominik NogaFebruary 24, 2025 at 8:24 AMEdited
@Maciej Grochalski I should have mentioned that, but i have decided to always move the user to the create order page, instead of the fulfillment page. Because i think it is less confusing, when you are always moved to the same place. What do you think about this?
Maciej GrochalskiFebruary 21, 2025 at 2:24 PM
The issue reported in the ticket is no longer present, however I see in the
Solutions:
If the user has rights for fulfillment: Move him to Orders → Fulfill Orders
If not: Move him either to home page or Requisitions → Create Orders (IMO better option)
@Dominik Noga could you specify which exactly permission is being checked? I seem to have fulfillment rights for supplying facility and I’m still being redirected to create order page.
Maciej GrochalskiFebruary 21, 2025 at 10:54 AMEdited
In that case there is still an issue. unfortunately I haven’t found documentation on the confluence - what exact rights are needed and how the flow should look like.
Please take a look:
it seems like one of: ORDERS_VIEW, ORDERS_EDIT, SHIPMENTS_EDIT, SHIPMENTS_VIEW, PODS_VIEW, PODS_MANAGE
is also needed. @Dominik Noga
I added PODS_MANAGE
and it seems for a next step I need also STOCK_CARDS_VIEW
right:
So summarizing:
To access the functionality we need Create orders
,
then after we choose program/facility parameters we need one of: ORDERS_VIEW, ORDERS_EDIT, SHIPMENTS_EDIT, SHIPMENTS_VIEW, PODS_VIEW, PODS_MANAGE
,
then at the end to add products we need STOCK_CARDS_VIEW
.
All rights were added to home facility to make it work.
Details
Assignee
UnassignedUnassignedReporter
Dominik NogaDominik NogaOriginal estimate
Time tracking
5h logged3h remainingPriority
MajorParent
Details
Details
Assignee
Reporter
Original estimate
Time tracking
Priority
Parent
Time Assistant
Open Time Assistant
Time Assistant
Open Time Assistant
Time Assistant

After creating requisitionless order via “Requisitions → Create Orders”, user is automatically moved to “Orders → Fulfill Orders” page.
If a user does not have the rights to fulfill the order, he will receive an error, and stay on the current page.
Test data
server: https://demo-v3.openlmis.org/
user: requesting_user1
password: haslo123
How to reproduce?
Log in as the requesting_user1
Go to Requisitions → Create Orders
Create the order for:
Program: ARV
Requesting facility: Lilongwe Health Center
Supplying facility: Lilongwe District Warehouse
You will be moved to the other screen, select and add any product and insert a positive quantity
Press create “Create order” and confirm the order in modal panel
Expected result
Order is created and the user is moved to the other page
Actual result
Order is created, but user receives and error, and stays on the current page
Solution
Check for the user rights after submitting the order
If the user has rights for fulfillment: Move him to Orders → Fulfill Orders
If not: Move him either to home page or Requisitions → Create Orders (IMO better option)