diff --git a/ckan/logic/action/create.py b/ckan/logic/action/create.py index 5b5576fd626..977d5f66038 100644 --- a/ckan/logic/action/create.py +++ b/ckan/logic/action/create.py @@ -1152,6 +1152,19 @@ def group_member_create(context, data_dict): return _group_or_org_member_create(context, data_dict) def organization_member_create(context, data_dict): + '''Make a user a member of an organization + + You must be authorized to edit the organization. + + :param id: the id or name of the organization + :param username: name or id of the user to be made member of the + organization + :param role: role of the user in the organization. One of ``member``, + ``editor``, or ``admin``. + + :returns: the newly created (or updated) membership + :rtype: dictionary + ''' _check_access('organization_member_create', context, data_dict) return _group_or_org_member_create(context, data_dict, is_org=True) diff --git a/ckan/logic/action/delete.py b/ckan/logic/action/delete.py index e866bfad55a..39cbd7e4cf1 100644 --- a/ckan/logic/action/delete.py +++ b/ckan/logic/action/delete.py @@ -444,6 +444,14 @@ def group_member_delete(context, data_dict=None): return _group_or_org_member_delete(context, data_dict) def organization_member_delete(context, data_dict=None): + '''Remove a user from a organization + + You must be authorized to edit the organization. + + :param id: the id or name of the organization + :param username: name or id of the user to be removed + + ''' return _group_or_org_member_delete(context, data_dict)