Announcement

Collapse
No announcement yet.

Formula ext\pdf\generate and permissions

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

  • Formula ext\pdf\generate and permissions

    I have a process defined in the BPM, which is triggered by the creation of a new record.

    When the user who creates the record has the role of administrator the process runs without any issue.

    When it is a normal user, the process executes without any issues, except in the ext\pdf\generate instruction that returns a null field, instead of the id of the pdf file created.

    The log states this:

    [2021-04-26 19:40:07] Espo.ERROR: Formula function: ext\pdf\generate, Error while generating. Message: . [] []

    Checking in the attachments it is seen that the necessary file has not been generated.

    It seems that there is a problem with permissions.

    The normal user that launches the process has three associated roles. All entities involved in the process have write, read (team) and update (team) permissions.

    That user belongs to only one team, where he is the only member

    I have reviewed in detail the related permissions in ext\pdf\generate

    ext\pdf\generate(ENTITY_TYPE, ENTITY_ID, TEMPLATE_ID, [FILENAME])

    ENTITY_TYPE is LGPetition and it has write, read (team) and update (team) permissions.

    ENTITY_ID the record that is used is created by and assigned to the user and assigned to the user's team.

    TEMPLATE_ID created by administrator and assigned to user's team

    There is a FILENAME defined

    I think that everything is defined correctly. But it does not work

    The only thing I can think of is that the user needs a permission to save the files generated with ext\pdf\generate.

    Any suggestions on how to solve this?

    Thank you in advance

  • #2
    I found out what happened. In case someone may need the answer:

    In the Role definitions the user need to have granted access to the templates. This is on top of the template being assigned to the team of the user

    Comment


    • #3
      I will take a look. We should not check permissions when calling pdf generation from formula.

      Comment

      Working...
      X