Skip to content

Fix Unauthorized Message Issue for Users with Project Permissions Creating Scripts #5679

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

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

sanjacornelius
Copy link
Contributor

@sanjacornelius sanjacornelius commented Nov 21, 2023

This PR resolves an issue where users with only Project Permissions encountered an Unauthorized message when creating a script in their project and being redirected to the script builder page.

The problem was traced to the script builder endpoint not being included as an allowed endpoint for users with the create-projects permission. The solution includes adding the script builder endpoint designer/scripts to the allowedEndpoints array for users with the create-projects permission.

Solution

  • Included the script builder endpoint designer/scripts in the allowedEndpoints array for users with the 'create-projects' permission.

How to Test

  1. Create a user with only Project Permissions.
  2. Log in as that user.
  3. Create a project.
  4. Within the project, select the '+ Asset' button and create a new script.
  5. Confirm that after creating the script, you are redirected to the script builder page without encountering errors.
  6. Navigate back to the project you created.
  7. Select the script title.
  8. Ensure that after selecting, you are redirected to the script builder page without encountering error

Related Tickets & Packages

ci:next

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.

Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ryancooley ryancooley merged commit 2f2c52e into next Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants