Observation/FOUR-13323: Category is displayed without the correct permission by agustinbusso · Pull Request #6129 · ProcessMaker/processmaker
Issue & Reproduction Steps
- login in the server https://next-qa.processmaker.net/
- Create a normal user
- Assign these permissions to normal user
- Create Processes
- Edit Processes
- View Processes
- Login with the new user
- Go to Designer > Processes
- Open the Categies tab
Note
After sync with Claudia Iriarte, an user that have access to create/edit a process should view process categories.
I noticed two issues:
The tabs in the top are getting the wrong labels because a problem with the indexes of the tabs after introduce the Templates feature (notice that you didn’t added permissions for templates, and you can see a Templates tab, but after clicking the templates tab, the list showing is the list of Categories instead of Templates. The same happens with the Categories tab, that should be Archived processes tab. After clicking the wrong categories tab the list showed is the list of archived processes)
The second issue is related to the permissions assignation in the permissions tab under user edit section. When selecting the Create/Edit Process permission we should activate the View categories automatically, in the same way it happens when Create Process permission is selected, the Edit Process permission also gets selected automatically. I have synchronized with Claudia Iriarte to fix both issues.
Solution
- Fix indexes in tabs for processes.
- Fix behavior when selecting create and edit process permission to auto activate view process categories
Working videos
Screen.Recording.2024-01-31.at.16.15.36.mov
Screen.Recording.2024-01-31.at.17.12.43.mov
How to Test
Scenario fix 1
- Assign permission create, edit and view process permission
- Go to Process list
- Verify you can see the tabs Processes, Categories and Archived processes
Scenario fix 2
- Go to user permissions
- Enable create OR edit process permission, view process categories permission should be activated
- Disable both create AND edit process permission, view process categories permission should be deactivated
Related Tickets & Packages
Code Review Checklist
- I have pulled this code locally and tested it on my instance, along with any associated packages.
- This code adheres to ProcessMaker Coding Guidelines.
- This code includes a unit test or an E2E test that tests its functionality, or is covered by an existing test.
- This solution fixes the bug reported in the original ticket.
- This solution does not alter the expected output of a component in a way that would break existing Processes.
- This solution does not implement any breaking changes that would invalidate documentation or cause existing Processes to fail.
- This solution has been tested with enterprise packages that rely on its functionality and does not introduce bugs in those packages.
- This code does not duplicate functionality that already exists in the framework or in ProcessMaker.
- This ticket conforms to the PRD associated with this part of ProcessMaker.