3

I have a SearchKit that is based on the Participants table. I created a table display that allows the user to see basic information on the participants (name, home city/state, participant status). This tool was designed to be used by a staff member to use when checking in participants. The staff member would view participants for a specific event (set by URL parameters) and then change the status of the participants as they arrived. This works well most of the time.

We will be having an event where a volunteer will be checking in the participants. I am trying to create a role that allows minimal access to view this report. Unfortunately, the only way I've been able to make this visible is giving the following permissions: view all contacts, administer CiviCRM, access CiviCRM backend and API, and access CiviEvent. Is there a way view/use a SearchKit display without this high of permissions? I'm also open to other ideas of checking in participants by a non-staff.

CiviCRM 5.41.2 Drupal 7

1
  • After doing some more testing, it looks like all SearchKit displays require the CiviCRM: administer CiviCRM permission. Once I put it into an afform, that permission is not required. However, I need it to be used as a SearchKit display so that I can use URL params. Is there a way to make a SearchKit display not require the CiviCRM: administer CiviCRM permission?
    – zach
    Commented Apr 7, 2022 at 16:03

1 Answer 1

6

Yes. You can do this by embedding your Search Display in an Afform, and controlling the permissions from there. To do so you want to disable permission checks on the Search Display:

Disable search display permissions

And on the Afform you want to set the permission appropriate for your volunteers to be able to access the form:

Afform permissions

To set url args for your search display, click on the tab for your display on the Afform, and select the field(s) you want to filter by. You can then select the name of the url argument:

Url args

Note that this is javascript-based so the argument goes after a hash sign like http://example.org/civicrm/my-afform/#/?financial_type_id=3

2
  • Thanks for the reply. The only reason I didn't go this route initially was because I was wanting a way to use URL params. On 5.41.2, afform doesn't seem to support them but search displays do. Does afform support this in a later release?
    – zach
    Commented Apr 12, 2022 at 13:45
  • 1
    Yes it does :) Updated answer.
    – Coleman
    Commented Apr 12, 2022 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.