Skip to content

Commit

Permalink
[#2939] Fix group controller for auth changesw
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Nov 19, 2012
1 parent a408ed5 commit 293534b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ckan/controllers/group.py
Expand Up @@ -167,12 +167,11 @@ def read(self, id):
_("Cannot render description")
c.description_formatted = genshi.HTML(error_msg)

c.group_admins = ckan.new_authz.get_group_or_org_admin_ids(c.group.id)
context['return_query'] = True

# c.group_admins is used by CKAN's legacy (Genshi) templates only,
# if we drop support for those then we can delete this line.
c.group_admins = self.authorizer.get_admins(c.group)
c.group_admins = ckan.new_authz.get_group_or_org_admin_ids(c.group.id)

limit = 20
try:
Expand Down Expand Up @@ -667,7 +666,7 @@ def followers(self, id):

def admins(self, id):
context = self._get_group_dict(id)
c.admins = self.authorizer.get_admins(context['group'])
c.admins = ckan.new_authz.get_group_or_org_admin_ids(context['group']['id'])
return render('group/admins.html')

def about(self, id):
Expand All @@ -681,7 +680,7 @@ def _get_group_dict(self, id):
data_dict = {'id': id}
try:
c.group_dict = get_action('group_show')(context, data_dict)
c.admins = self.authorizer.get_admins(context['group'])
c.admins = ckan.new_authz.get_group_or_org_admin_ids(context['group']['id'])
except NotFound:
abort(404, _('Group not found'))
except NotAuthorized:
Expand Down

0 comments on commit 293534b

Please sign in to comment.