Announcement

Collapse
No announcement yet.

Make record based on status accessible only to users with role

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

  • Make record based on status accessible only to users with role

    Hi,

    I would like to make records based on status accessible to users with specific roles.

    So e.g. record Volunteer, with status Applicant, Active, Excited.
    I want regular users to only be able to access active volunteers. And someone with a specific role to see also Applicant and Excited volunteers.

    I wasn't able yet to find the conditional logic to do this.

    Any thoughts?

  • #2
    Hi Maarten,

    It will require some coding. You need a custom ACL checker and SELECT filter.

    1. ACL

    Access checker https://docs.espocrm.com/development...eckerclassname

    It checks access to a specific record.

    2. SELECT

    Access control filter: https://docs.espocrm.com/development...erclassnamemap

    Applies conditions to SQL when records are selected.

    You can define mandatory filter that will be always applied for all users. In this filter class apply where conditions depending on a user.

    Comment


    • #3
      Custom access checker example: https://github.com/espocrm/espocrm/b...essChecker.php

      Custom access filter example: https://github.com/espocrm/espocrm/b.../Mandatory.php

      Comment


      • a.slyzhko
        a.slyzhko commented
        Editing a comment
        I'm trying to extend access to records. And get success with single record with AccessChecker, but no luck with list view. I applied Mandatory filter to select records, but they don't appear on front-end
    Working...
    X