Skip to content

GNIP 71 - Layer Set Permissions Admin Dashboard #5274

@afabiani

Description

@afabiani

GNIP 71 - Layer Set Permissions Admin Dashboard

Overview

GeoNode 2.10.1 provides a very useful management command (set_layers_permisions) allowing an administrator to easily add / remove permissions to groups and users on one or more layers.

The set_layers_permisions command arguments are:

  • permissions to set/unset --> read (r), write (w), download (d), owner (o)
    READ_PERMISSIONS = [
        'view_resourcebase'
    ]
    WRITE_PERMISSIONS = [
        'change_layer_data',
        'change_layer_style',
        'change_resourcebase_metadata'
    ]
    DOWNLOAD_PERMISSIONS = [
        'download_resourcebase'
    ]
    OWNER_PERMISSIONS = [
        'change_resourcebase',
        'delete_resourcebase',
        'change_resourcebase_permissions',
        'publish_resourcebase'
    ]
    
  • resources (layers) which permissions will be assigned on --> type the layer title (use quotation mark for titles with white space), multiple choices can be typed with white space separator, if no titles are provided all the layers will be considered
  • users who permissions will be assigned to, multiple choices can be typed with a white space separator
  • groups who permissions will be assigned to, multiple choices can be typed with a white space separator
  • delete flag (optional) which means the permissions will be unset

Usage examples:

python manage.py set_layers-permissions -p write -u user_A user_B -g group_C -r layer_X 'layer Y'
Assign write permissions on the layers layer_X and layer Y to the users user_A and user_B and to the group group_C.

python manage.py set_layers-permissions -p owner -g group_C
Assign owner permissions on all the layers to the group group_C.

python manage.py set_layers-permissions -p download -u user_A -r layer_X -d
Unset download permissions on the layer layer_X for the user user_A.

Documentation available at Docs » Tutorials » Administrators Workshop » Management Commands for GeoNode.

The purpose of this GNIP is to allow an administrator to get the same functionalities from the admin dashboard too.

The general idea would be to create a new action accessible from the Admin >> Layers dashboard section, similar to the already existing Metadata batch update one.

image

A new action named Set layers permissions will be available from the list, redirecting the administrator to a form to set / unset read, write, download and ownership permissions on the selected layers.

image

Proposed By

Alessio Fabiani (@afabiani)

Assigned to Release

This proposal is for GeoNode 2.10.2 / 3.0.

State

  • Under Discussion
  • In Progress
  • Completed
  • Rejected
  • Deferred

Motivation

We would like to make easier access to the set_all_layers_permissions management command by adding the possibility to have the same functionalities from the GeoNode Admin GUI too.

Feedback

[2019/11/15] Proposal created.

Voting

Project Steering Committee:

  • Alessio Fabiani: +1
  • Francesco Bartoli:
  • Paolo Corti: +1
  • Simone Dalmasso:
  • Toni Schoenbuchner: +1

Links

Metadata

Metadata

Assignees

Labels

gnipA GeoNodeImprovementProcess Issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions