I can only access SearchKit as an admin. I have another role with the permissions "administer CiviCRM System", "administer CiviCRM Data", "SearchKit: edit and delete searches" and "FormBuilder: edit and delete forms". When I try to open SearchKit, I get the following error message: "Civi\API\Exception\UnauthorizedException: Authorization failed in /html/wordpress/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php on line 149". Any ideas why? Thanks in advance.
1 Answer
Does the user have "access CiviCRM backend and API"? That plus "SearchKit: edit and delete searches" works for me.
-
Hey Lars, thanks for your response. The user also has access to CiviCRM backend and API.– MariaCommented Oct 25, 2023 at 14:25
-
Seems like it must be something specific to your site as I just tried it here: demo-195-1u1e5.test-1.civicrm.org:8001 with demo/demo (which only has those two permissions) and it works as expected.– Lars SGCommented Oct 25, 2023 at 15:59
-
I have found the issue. There was 1 SearchKit form with entity expenses and the permission "manage expenses" was not given to the user.– MariaCommented Nov 8, 2023 at 19:18
-
That sounds like a bug to me, you should be able to access SearchKit in general even if specific searches require specific permissions. I'd post an issue on Gitlab.– Lars SGCommented Nov 8, 2023 at 21:47
-
Yes, you're right. I've just posted an issue: lab.civicrm.org/dev/core/-/issues/4764– MariaCommented Nov 10, 2023 at 9:14