organization_list_for_user
Return the organizations that the user has a given permission for.
Specifically it returns the list of organizations that the currently authorized user has a given permission (for example: "manage_group") against.
By default this returns the list of organizations that the currently authorized user is member of, in any capacity.
When a user becomes a member of an organization in CKAN they're given a "capacity" (sometimes called a "role"), for example "member", "editor" or "admin".
Each of these roles has certain permissions associated with it. For example the admin role has the "admin" permission (which means they have permission to do anything). The editor role has permissions like "create_dataset", "update_dataset" and "delete_dataset". The member role has the "read" permission.
This function returns the list of organizations that the authorized user has a given permission for. For example the list of organizations that the user is an admin of, or the list of organizations that the user can create datasets in. This takes account of when permissions cascade down an organization hierarchy.
CKAN API token
In: header
the name or id of the user to get the organization list for (defaults to the currently authorized user, logged in or via the API key)
the permission the user has against the returned organizations, for example "read" or "create_dataset" (default: "manage_group")
include the package_count in each org (default: False)
curl -X POST "http://localhost:5000/api/3/action/organization_list_for_user" \ -H "Content-Type: application/json" \ -d '{}'