Skip to content

FOUR-14078: When creating scripts with AI, I find permissions issues preventing me from previewing them in the Preview Pane.#6189

Merged
ryancooley merged 3 commits intonextfrom
observation/FOUR-14078
Feb 8, 2024
Merged

FOUR-14078: When creating scripts with AI, I find permissions issues preventing me from previewing them in the Preview Pane.#6189
ryancooley merged 3 commits intonextfrom
observation/FOUR-14078

Conversation

@danloa
Copy link
Copy Markdown
Contributor

@danloa danloa commented Feb 8, 2024

Steps to reproduce:

  • Create a user with project permissions only.
  • Create a project and assign it to the previously created user.
  • Log in with the created user.
  • Create a process from scratch. The process must contain tasks and scripts.
  • Generate the process's assets using the AI Asset Generator.
    image
  • Try to use the preview feature in one of the script of the created process.

Current behavior:

A screen with an "Unauthorized" message is displayed

Expected behavior:

Process assets created for a process that pertains to a project must be accessible to users of the project, even if the users don't have the "view-scripts" and "view-screens" permissions.

Related issues:

https://processmaker.atlassian.net/browse/FOUR-14078
Related PR https://github.com/ProcessMaker/package-ai/pull/77

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.

@processmaker-sonarqube
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@agustinbusso agustinbusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected
With projects installed

Screen.Recording.2024-02-08.at.12.48.36.mov

Without projects installed

Screen.Recording.2024-02-08.at.12.56.50.mov

@ryancooley ryancooley merged commit a491503 into next Feb 8, 2024
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