Custom Query (2152 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (595 - 597 of 2152)

Ticket Resolution Summary Owner Reporter
#2691 fixed Tag 404 error toby shevski

Reported by shevski, 22 months ago.

Description

404 Not Found The resource could not be found.

#1044 fixed Sysadmins locked-out of API without Right: (visitor, SITE_READ, System) pudo dread

Reported by dread, 3 years ago.

Description

The problem is that in ckan/controllers/rest.py the BaseApiController? has this method:

    def __before__(self, action, **env):
        BaseController.__before__(self, action, **env)
        if not self.authorizer.am_authorized(c, model.Action.SITE_READ, model.System):
            abort(401, _('Not authorized to see this page'))

which works on the basis of your c.user, rather than your apikey. All API users are treated as visitors (since API users don't get a login cookie) and even a sysadmin's apikey is blocked unless there is a right for a Visitor to SITE_READ.

Also needs tests.

(Also, why is this restriction only on the API, package search, group index and tags and agroup index? I'm guessing SITE_READ is only for places where other authz don't apply, but maybe it should not be called 'SITE_READ' but 'OTHER_READ' or something?)

#727 fixed Sysadmin can approve a publisher pudo pudo
Note: See TracQuery for help on using queries.