Skip to content

Commit

Permalink
[Fixes GeoNode#10055] Modify Metadata form with permissions check (Ge…
Browse files Browse the repository at this point in the history
…oNode#10057) (GeoNode#10076)

* -[Fixes GeoNode#10055] Modify Metadata form with permissions check

* - check user in form

* - update tests

* - add tests

Co-authored-by: Giovanni Allegri <[email protected]>

Co-authored-by: NAGGINDA MARTHA <[email protected]>
Co-authored-by: Giovanni Allegri <[email protected]>
  • Loading branch information
3 people authored and ridoo committed Feb 22, 2024
1 parent 61cab75 commit 34aa2c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions geonode/base/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,9 @@ def __init__(self, *args, **kwargs):
if field in ["owner"] and not self.can_change_perms:
self.fields[field].disabled = True

if field in ['poc', 'owner'] and not self.can_change_perms:
self.fields[field].disabled = True

def disable_keywords_widget_for_non_superuser(self, user):
if settings.FREETEXT_KEYWORDS_READONLY and not user.is_superuser:
self["keywords"].field.disabled = True
Expand Down

0 comments on commit 34aa2c0

Please sign in to comment.