How to allow entity access in Flowchart or PHP when role permissions are restricted

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lj4353
    Senior Member
    • Nov 2023
    • 143

    #1

    How to allow entity access in Flowchart or PHP when role permissions are restricted

    Hi,

    I have removed access to a certain entity (e.g., Team) for a specific user role via the Roles settings, which works as expected on the UI.

    However, I need to allow access to this entity within a Flowchart (BPM process) or within PHP logic (e.g., in a hook or service class), regardless of the user's role permissions.

    Is there a way to:
    1. Allow entity access within a Flowchart even if the user's role restricts it?
    2. Programmatically bypass permission checks in PHP code for specific backend logic?

    In Flowchart, I've noticed the "Run as system user" option — does it allow bypassing these restrictions?

    Any recommended approach or best practice would be appreciated.

    Thanks!
  • victor
    Active Community Member
    • Aug 2022
    • 910

    #2
    Regular Users do not need to have access to Workflows or BPMNs at all for their actions to trigger Workflows or BPMNs (if, of course, the conditions for triggering are met).

    Comment


    • lj4353
      lj4353 commented
      Editing a comment
      Although it's true that regular users can trigger workflows or BPMNs as long as the trigger conditions are met, even without directly accessing the workflows or BPMNs themselves, in practice, an error message saying "No access to the entity" may appear when a regular user performs an action that is supposed to trigger a workflow or BPMN.
Working...