Closed shanthisa closed 5 months ago
The reason I said that this needs to be done as a migration is because it is a security issue when we have the check only in the frontend. Through JavaScript console one can set a different user for a meal plan. So it is not the best practices. However for now I shall accept this PR. But this needs to be re-implemented with a check whether it is the current user when it is of the role app_user to ensure we don’t all app_user to assign any other user for the mealplan. I am approving and merging because it will not be seen by the client and it is required for the demo.
QA is done. test case MP-DuplicateMealPlanForClient-098 : Passed.
Ok to close! 👍
Describe the bug Since we removed the functionality to assign user, when we create a duplicate meal plan the new meal plan will not have any user assigned.
To Reproduce Steps to reproduce the behavior:
Expected behavior The user should be the current logged in user as the client will want to have their id to be associated with their meal plan.
Additional context Solution: So when it is app_user role who has logged in, duplicate_meal_plan should take the current person id as p_id.