geonode.api.authorization

Classes

GeoNodeAuthorization

Object level API authorization based on GeoNode granular

GeonodeApiKeyAuthentication

Override ApiKeyAuthentication to prevent 401 response when no api key is provided.

GeoNodeStyleAuthorization

Object level API authorization based on GeoNode granular permission system.

ApiLockdownAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

GeoNodePeopleAuthorization

API authorization that allows only authenticated users to view list of users

GroupAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

GroupProfileAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

Module Contents

class geonode.api.authorization.GeoNodeAuthorization[source]

Bases: tastypie.authorization.DjangoAuthorization

Object level API authorization based on GeoNode granular permission system

read_list(object_list, bundle)[source]
read_detail(object_list, bundle)[source]
create_list(object_list, bundle)[source]
create_detail(object_list, bundle)[source]
update_list(object_list, bundle)[source]
update_detail(object_list, bundle)[source]
delete_list(object_list, bundle)[source]
delete_detail(object_list, bundle)[source]
class geonode.api.authorization.GeonodeApiKeyAuthentication[source]

Bases: tastypie.authentication.ApiKeyAuthentication

Override ApiKeyAuthentication to prevent 401 response when no api key is provided.

is_authenticated(request, **kwargs)[source]

Finds the user and checks their API key.

Should return either True if allowed, False if not or an HttpResponse if you need something custom.

class geonode.api.authorization.GeoNodeStyleAuthorization[source]

Bases: GeoNodeAuthorization

Object level API authorization based on GeoNode granular permission system.

Style object permissions should follow it’s layer permissions.

filter_by_resource_ids(object_list, permitted_ids)[source]

Filter Style queryset by permitted resource ids.

read_list(object_list, bundle)[source]
delete_detail(object_list, bundle)[source]
class geonode.api.authorization.ApiLockdownAuthorization[source]

Bases: tastypie.authorization.DjangoAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

If setting “API_LOCKDOWN” is set to True, resource can only be accessed by authenticated users. For anonymous requests, empty lists are returned.

read_list(object_list, bundle)[source]
class geonode.api.authorization.GeoNodePeopleAuthorization[source]

Bases: tastypie.authorization.DjangoAuthorization

API authorization that allows only authenticated users to view list of users

read_list(object_list, bundle)[source]
class geonode.api.authorization.GroupAuthorization[source]

Bases: ApiLockdownAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

If setting “API_LOCKDOWN” is set to True, resource can only be accessed by authenticated users. For anonymous requests, empty lists are returned.

read_list(object_list, bundle)[source]
class geonode.api.authorization.GroupProfileAuthorization[source]

Bases: ApiLockdownAuthorization

API authorization for all resources which are not protected by others authentication/authorization mechanism.

If setting “API_LOCKDOWN” is set to True, resource can only be accessed by authenticated users. For anonymous requests, empty lists are returned.

read_list(object_list, bundle)[source]