From 606ea35c9d5e370f1a11fde69a35d457bdd5b88c Mon Sep 17 00:00:00 2001 From: tobes Date: Tue, 9 Oct 2012 13:37:25 +0100 Subject: [PATCH] [#2939] Replace get editable groups in base controller --- ckan/lib/base.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ckan/lib/base.py b/ckan/lib/base.py index edc4264e2f1..e6a9e4f2f09 100644 --- a/ckan/lib/base.py +++ b/ckan/lib/base.py @@ -469,12 +469,8 @@ def _get_timing_cache_path(self): @classmethod def _get_user_editable_groups(cls): - if not hasattr(c, 'user'): - c.user = model.PSEUDO_USER__VISITOR - import ckan.authz # Todo: Move import to top of this file? - groups = ckan.authz.Authorizer.authorized_query( - c.user, model.Group, action=model.Action.EDIT).all() - return [g for g in groups if g.state == model.State.ACTIVE] + # get editable groups for current user + return h.groups_available() def _get_package_dict(self, *args, **kwds): import ckan.forms