I am not understanding the meaning of 'object_role' and 'object_id' in ACL API. I was trying to manage ACL using CiviCRM API 3.
1 Answer
Object table is the type of data the ACL is operating on.
For eg: if you want to create an ACL which grants permission for an event - object table, in this case, will be civicrm_event
.
Object id is the id of the event to which the permission is applied to. An example of API which uses these two params could be -
$result = civicrm_api3('Acl', 'create', [
'object_table' => "civicrm_event",
'object_id' => 2, //event id, 0 for all events.
]);
-
What is the use of "civicrm_saved_search" table? Because I want to give permission for one role to other groups ( View permission) using CiviCRM API.– deepakJan 17, 2019 at 12:03
-
civicrm_saved_search
table is used to store details of the smart groups created in civicrm. To give permission for a SG, i think you can directly use civicrm_group forobject table
and id of the smart group inobject_id
param. Jan 22, 2019 at 2:35