Skip to content

Commit

Permalink
[Closes #561] Hide "download" permissions for maps and apps (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Fabiani authored Nov 3, 2021
1 parent d355153 commit 7569880
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions geonode_mapstore_client/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@ def run_setup_hooks(*args, **kwargs):
from django.conf import settings
from django.conf.urls import url, include
from geonode.api.urls import router
from geonode.security.permissions import (
VIEW_PERMISSIONS,
OWNER_PERMISSIONS
)
from geonode.groups.conf import settings as groups_settings

LOCAL_ROOT = os.path.abspath(os.path.dirname(__file__))
settings.TEMPLATES[0]["DIRS"].insert(0, os.path.join(LOCAL_ROOT, "templates"))

allowed_perms = {
"anonymous": VIEW_PERMISSIONS,
"default": OWNER_PERMISSIONS,
groups_settings.REGISTERED_MEMBERS_GROUP_NAME: OWNER_PERMISSIONS
}
setattr(settings, "CLIENT_APP_LIST", ['geostory', "dashboard"])
setattr(settings, "CLIENT_APP_ALLOWED_PERMS", [{'geostory': allowed_perms}, {"dashboard": allowed_perms}])

urlpatterns += [
url(r'^mapstore/', include('mapstore2_adapter.urls')),
Expand Down

0 comments on commit 7569880

Please sign in to comment.