Announcement

Collapse
No announcement yet.

ext\pdf\generate error related to permissions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ext\pdf\generate error related to permissions


    I have a problem in the execution of a BPM that I think is related to permissions.

    In what I am going to tell you there are two users. One user is me, with administrator permissions, and the other is a regular user.

    What happens is the following:

    A new record is created in the table A. That record is registered as created and assigned to the user who registers it.

    It launches a BPM process that generates several records related to A in a table B. The records B appear as created by and assigned to the user who registered the record A.

    As part of that same BPM process, it creates a PDF file using a template via the ext\pdf\generate instruction.
    The template uses the related records technique ({{#each xyzs}} {{/each}}).
    It is assigned to the team of which the user who registered A

    When I am the one who creates the A record (I am an administrator user) this process works without problems generating the pdf file.

    When the process is launched by the normal user, the process works apparently well. The process scheme appears as finished and with all the tasks in green.

    However it does not generate the pdf file and if you consult the system log you will see the following error message "Espo.ERROR: Formula ext\pdf\generate: Error while generating. Message: [] []"

    Since for an administrator user it works perfectly and for a regular user doesnt, seems that the error is due to the different permissions of both users.

    Through the Roles, the ´regular user is authorized to:
    For entity A, he can create records and read and edit those of the team.
    For the entity B, he can create records and read those of the team. He cannot edit.

    It seems to me that everything is defined correctly, but nevertheless it does not work for the regular user

    I have verified that the user can access the records according to the roles.

    I don't know how these permissions work within a BPM process. I have assumed that it does in an identical way.

    What can I do? Is this a bug?


  • #2
    Hello,
    on many BPM script, there are these line :

    if (!$this->getAcl()->checK($process, 'edit')) throw new Forbidden();

    So i imagine, Role must "Edit"

    Haa.. just see strange :
    ->checK(...
    and
    ->check( ...
    tippo error maybe... (i have open a bug in forum.. follow it for have Yuri response)
    Last edited by item; 12-03-2020, 09:48 PM.

    Comment


    • #3
      Hi .

      I did what you suggested and change the Role to Edit, but still the same thing.

      So, the issue must be somewhere else

      Comment

      Working...
      X