Skip to content

Commit

Permalink
- Exclude public-invite groups from metadata choices
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jul 13, 2018
1 parent 77c1c24 commit 47af058
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions geonode/documents/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,11 @@ def document_metadata(
try:
all_metadata_author_groups = chain(
request.user.group_list_all(),
GroupProfile.objects.exclude(access="private"))
GroupProfile.objects.exclude(
access="private").exclude(access="public-invite"))
except BaseException:
all_metadata_author_groups = GroupProfile.objects.exclude(
access="private")
access="private").exclude(access="public-invite")
[metadata_author_groups.append(item) for item in all_metadata_author_groups
if item not in metadata_author_groups]

Expand Down
5 changes: 3 additions & 2 deletions geonode/layers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,10 +1118,11 @@ def layer_metadata(
try:
all_metadata_author_groups = chain(
request.user.group_list_all().distinct(),
GroupProfile.objects.exclude(access="private"))
GroupProfile.objects.exclude(
access="private").exclude(access="public-invite"))
except BaseException:
all_metadata_author_groups = GroupProfile.objects.exclude(
access="private")
access="private").exclude(access="public-invite")
[metadata_author_groups.append(item) for item in all_metadata_author_groups
if item not in metadata_author_groups]

Expand Down
5 changes: 3 additions & 2 deletions geonode/maps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,11 @@ def map_metadata(
try:
all_metadata_author_groups = chain(
request.user.group_list_all(),
GroupProfile.objects.exclude(access="private"))
GroupProfile.objects.exclude(
access="private").exclude(access="public-invite"))
except BaseException:
all_metadata_author_groups = GroupProfile.objects.exclude(
access="private")
access="private").exclude(access="public-invite")
[metadata_author_groups.append(item) for item in all_metadata_author_groups
if item not in metadata_author_groups]

Expand Down

0 comments on commit 47af058

Please sign in to comment.