diff --git a/docs/tutorials/advanced/geonode_settings/settings.txt b/docs/tutorials/advanced/geonode_settings/settings.txt index a1260f7d575..9cd5af1830f 100644 --- a/docs/tutorials/advanced/geonode_settings/settings.txt +++ b/docs/tutorials/advanced/geonode_settings/settings.txt @@ -397,6 +397,12 @@ Default:: A list of dictionaries that is used to generate the social links displayed in the Share tab. For each origin, the name and URL format parameters are replaced by the actual values of the ResourceBase object (layer, map, document). +SHOW_PROFILE_EMAIL +------------------ +Default: ``False`` + +A boolean which specifies wether to display the email in user's profile. + CKAN_ORIGINS -------------- Default:: diff --git a/geonode/context_processors.py b/geonode/context_processors.py index 57c9be013ff..43867d76933 100644 --- a/geonode/context_processors.py +++ b/geonode/context_processors.py @@ -136,6 +136,11 @@ def resource_urls(request): MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS=getattr( settings, 'MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS', False ), + SHOW_PROFILE_EMAIL=getattr( + settings, + "SHOW_PROFILE_EMAIL", + False + ), ) defaults['message_create_url'] = 'message_create' if not settings.USER_MESSAGES_ALLOW_MULTIPLE_RECIPIENTS\ else 'message_create_multiple' diff --git a/geonode/people/templates/people/profile_detail.html b/geonode/people/templates/people/profile_detail.html index 4759e1945f1..433da7c4586 100644 --- a/geonode/people/templates/people/profile_detail.html +++ b/geonode/people/templates/people/profile_detail.html @@ -61,6 +61,7 @@

{{ profile.first_name|default:profile.name_long }}

+ {% if SHOW_PROFILE_EMAIL %} {% if profile.email %} @@ -69,6 +70,7 @@

{{ profile.first_name|default:profile.name_long }}

{% endif %} + {% endif %} diff --git a/geonode/settings.py b/geonode/settings.py index efdd7d320ff..80dc136d07d 100644 --- a/geonode/settings.py +++ b/geonode/settings.py @@ -1197,6 +1197,9 @@ # If this option is enabled, Groups will become strictly Mandatory on Metadata Wizard GROUP_MANDATORY_RESOURCES = False +# A boolean which specifies wether to display the email in user's profile +SHOW_PROFILE_EMAIL = False + # Enables cross origin requests for geonode-client MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS = strtobool(os.getenv( 'MAP_CLIENT_USE_CROSS_ORIGIN_CREDENTIALS',
{% trans 'Not provided.' %}
{{ profile.position | default:_('Not provided.') }}