geonode.geoserver.acl.acl_client

Attributes

logger

Exceptions

ACLException

Common base class for all non-exit exceptions.

Classes

Rule

Rule class inherited from gsauth_client.models.Rule but with some additional methods for Geofence format compatibility

Batch

_summary_

AutoPriorityBatch

_summary_

AclClient

AclUtils

Module Contents

geonode.geoserver.acl.acl_client.logger[source]
exception geonode.geoserver.acl.acl_client.ACLException[source]

Bases: Exception

Common base class for all non-exit exceptions.

class geonode.geoserver.acl.acl_client.Rule(access: str, bool, id=None, priority=None, workspace=None, layer=None, user=None, group=None, service=None, request=None, subfield=None, geo_limit=None, catalog_mode=None)[source]

Bases: geonode.geoserver.acl.gsauth_client.models.Rule

Rule class inherited from gsauth_client.models.Rule but with some additional methods for Geofence format compatibility

ALLOW = 'ALLOW'[source]
DENY = 'DENY'[source]
LIMIT = 'LIMIT'[source]
CM_MIXED = 'MIXED'[source]
fields[source]
_limits[source]
set_priority(pri: int)[source]
get_object() dict[source]
class geonode.geoserver.acl.acl_client.Batch(log_name=None)[source]

_summary_ A ACL Batch. It’s a list of operations that will be executed transactionally inside ACL (?).

Example:

{
"Batch": {
    "operations": [
        {
            "@service": "rules",
            "@type": "insert",
            "Rule": {
                "priority": 0,
                "user": "admin",
                "service": "WMS",
                "workspace": "geonode",
                "layer": "san_andres_y_providencia_administrative",
                "access": "ALLOW"
            }
        },
        {
            "@service": "rules",
            "@type": "insert",
            "Rule": {
                "priority": 1,
                "user": "admin",
                "service": "GWC",
                "workspace": "geonode",
                "layer": "san_andres_y_providencia_administrative",
                "access": "ALLOW"
            }
        },
        {
            "@service": "rules",
            "@type": "insert",
            "Rule": {
                "priority": 2,
                "user": "admin",
                "service": "WFS",
                "workspace": "geonode",
                "layer": "san_andres_y_providencia_administrative",
                "access": "ALLOW"
            }
        },
        {
            "@service": "rules",
            "@type": "insert",
            "Rule": {
                "priority": 3,
                "user": "admin",
                "service": "WPS",
                "workspace": "geonode",
                "layer": "san_andres_y_providencia_administrative",
                "access": "ALLOW"
            }
        },
        {
            "@service": "rules",
            "@type": "insert",
            "Rule": {
                "priority": 4,
                "user": "admin",
                "workspace": "geonode",
                "layer": "san_andres_y_providencia_administrative",
                "access": "ALLOW"
                }
            }
        ]
    }
}
Returns:

Batch

Return type:

_type_

operations = [][source]
log_name[source]
__str__() str[source]
add_delete_rule(rule_id: int)[source]
add_insert_rule(rule: Rule)[source]
length() int[source]
get_object() dict[source]
class geonode.geoserver.acl.acl_client.AutoPriorityBatch(start_rule_pri: int, log_name=None)[source]

Bases: Batch

_summary_ A Batch that handles the priority of the inserted rules. The first rule will have the declared start_rule_pri, next Rules will have the priority incremented.

pri[source]
add_insert_rule(rule: Rule)[source]
class geonode.geoserver.acl.acl_client.AclClient(host=None, username=None, password=None)[source]
configuration[source]
api_client[source]
api_instance[source]
insert_rule(rule)[source]
delete_rule_by_id(rule_id)[source]
run_batch(batch: Batch, timeout: int = None) bool[source]
invalidate_cache()[source]
get_first_available_priority()[source]
count_all_rules()[source]
get_rules(limit=None, next_cursor=None)[source]
class geonode.geoserver.acl.acl_client.AclUtils(acl_client)[source]
acl_client[source]
api_instance[source]
update_rule_by_id(rule_id, rule)[source]
get_dataset_rules(workspace: str = None, layer: str = None)[source]
collect_delete_layer_rules(workspace_name: str, layer_name: str, batch: Batch = None) Batch[source]

Collect delete operations in a Batch for all rules related to a layer

delete_layer_rules(workspace_name: str, layer_name: str) bool[source]

Delete all Rules related to a specific Layer

get_first_available_priority()[source]