Skip to content
Snippets Groups Projects
Commit f9825065 authored by Seamus Lee's avatar Seamus Lee
Browse files

Mention the change in behaviour around check permissions in APiv4 in Permissions chapter

parent 5922b37c
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ When you write code, you can look at `CRM_Core_Permission::check` to see if the ...@@ -25,7 +25,7 @@ When you write code, you can look at `CRM_Core_Permission::check` to see if the
## API Permissions ## API Permissions
Depending on how the API is called, it is either called with a `check_permissions` flag turned off or turned on. When it is turned off, it will run the API without checking if the user has the necessary permissions to perform the action needed. If you turn `check_permissions` on then there will be tests done. By default code in CLI tools e.g. drush or WP-cli or within core code or extension code that is done at run time, the default in CiviCRM APIv3 is that the `check_permissions` flag is turned off. If you call the CiviCRM API through the rest interface then by default the `check_permissions` flag will be turned on. The permissions needed to make various API calls are defined in `CRM_Core_Permission::getEntityActionPermissions()` Depending on how the API is called, it is either called with a `check_permissions` flag turned off or turned on. When it is turned off, it will run the API without checking if the user has the necessary permissions to perform the action needed. If you turn `check_permissions` on then there will be tests done. By default code in CLI tools e.g. drush or WP-cli or within core code or extension code that is done at run time, the default in CiviCRM APIv3 is that the `check_permissions` flag is turned off. If you call the CiviCRM APIv3 through the rest interface then by default the `check_permissions` flag will be turned on. The permissions needed to make various API calls are defined in `CRM_Core_Permission::getEntityActionPermissions()`. By default in APIv4 `check_permissions` flag is turned on no matter the environment see also [API Wrapper in APIv4 chapter](/api/v4/differences-with-v3.md#api-wrapper).
## Extending and Implementing Permission Structure {:#extensions} ## Extending and Implementing Permission Structure {:#extensions}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment