Skip to content

Commit

Permalink
Minor review of the current advanced resource workflow implementation #…
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Oct 20, 2020
1 parent 15b5006 commit 1800f85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions geonode/geoapps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,6 @@ def geoapp_metadata(request, geoappid, template='apps/app_metadata.html', ajax=T

if settings.ADMIN_MODERATE_UPLOADS:
if not request.user.is_superuser:
if settings.RESOURCE_PUBLISHING:
geoapp_form.fields['is_published'].widget.attrs.update(
{'disabled': 'true'})

can_change_metadata = request.user.has_perm(
'change_resourcebase_metadata',
geoapp_obj.get_self_resource())
Expand All @@ -499,6 +495,9 @@ def geoapp_metadata(request, geoappid, template='apps/app_metadata.html', ajax=T
except Exception:
is_manager = False
if not is_manager or not can_change_metadata:
if settings.RESOURCE_PUBLISHING:
geoapp_form.fields['is_published'].widget.attrs.update(
{'disabled': 'true'})
geoapp_form.fields['is_approved'].widget.attrs.update(
{'disabled': 'true'})

Expand Down

0 comments on commit 1800f85

Please sign in to comment.