okfn/ckan — pull request #1421 by amercader (2014-01-08 16:18:37+00:00)
Title: Disabling activity_streams borks editing groups and user

If you configure ckan.activity_streams_enabled=True then the user gets an exception when saving a group or user.

This is because group_update calls calls activity_create which sees the config option and returns immediately. Because it doesn't call check_access, the Auth Audit complains. See exception below:

```
File '/vagrant/src/ckan/ckan/controllers/group.py', line 464 in edit
return self._save_edit(id, context)
File '/vagrant/src/ckan/ckan/controllers/group.py', line 543 in _save_edit
group = self._action('group_update')(context, data_dict)
File '/vagrant/src/ckan/ckan/logic/__init__.py', line 423 in wrapped
result = _action(context, data_dict, **kw)
File '/vagrant/src/ckan/ckan/logic/action/update.py', line 610 in organization_update
return _group_or_org_update(context, data_dict, is_org=True)
File '/vagrant/src/ckan/ckan/logic/action/update.py', line 566 in _group_or_org_update
_get_action('activity_create')(activity_create_context, activity_dict)
File '/vagrant/src/ckan/ckan/logic/__init__.py', line 430 in wrapped
raise Exception('Action Auth Audit: %s' % action_name)
Exception: Action Auth Audit: activity_create
```

(I'm not clear why creating or editing a package wouldn't cause this too, but create_activity doesn't appear to be called)

This appears to affect all versions since #1060 Auth Audit was merged 1st August 2013, so I believe that is just 2.2b.