ckanaction

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.

POST
organization_list_for_user

Authorization

apiTokenHeader
Authorization<token>

CKAN API token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

curl -X POST "http://localhost:5000/api/3/action/organization_list_for_user" \  -H "Content-Type: application/json" \  -d '{}'