Implement 'View Additional Asset Actions' Project Permission by sanjacornelius · Pull Request #5615 · ProcessMaker/processmaker
Issue & Reproduction Steps
This PR introduces a new project permission named 'view-additional-asset-actions.' This permission provides precise control over the permissions granted to Project Members for managing projects and project assets. When enabled, the permission grants access to additional actions for each asset. For example, users with this permission enabled will have access to 'archive,' 'edit,' and other actions related to processes. Similarly, for screens, users will have access to 'delete,' 'edit,' and other relevant actions.
When the permission is disabled, users will only have default actions related to projects, such as 'Add to Project,' 'Copy to Project,' and 'Remove from Project.'
Solution
- Introduced the 'view-additional-asset-actions' project permission to control access to additional actions for project assets.
- Modified the behavior of the ellipsis menu for project assets based on the 'view-additional-asset-actions' permission.
How to Test
- Create two new users.
- Ensure that all project permissions are enabled for both users during creation.
- For one of the users, disable the 'View Additional Asset Actions' permission.
- Configure projects with assets and assign the users as project members.
- Log in as both users and confirm that the user with the 'View Additional Asset Actions' permission enabled has access to additional asset actions in the ellipsis menu for each asset.
- Verify that the user without the 'View Additional Asset Actions' permission enabled only has the default project actions for each asset in the ellipsis menu.
Related Tickets & Packages
- User Story FOUR-11844
- Tasks FOUR-11924 & FOUR-11980
- Projects PR
- Data Sources PR
- Decision Engine PR
ci:next
ci:package-projects:task/FOUR-11924
ci:package-decision-engine:task/FOUR-11924
ci:package-data-sourcs:task/FOUR-11924
ci:deploy
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.