Commit 6fb1261c authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Optionally display projects in astakos menu

New ASTAKOS_PROJECTS_VISIBLE setting (defaults to False) added to
control whether the projects menu should be visible in astakos user
views.
parent a7533a9b
......@@ -46,7 +46,8 @@ from astakos.im.models import AstakosUser, Service, Resource
from astakos.im.api.faults import (
Fault, ItemNotFound, InternalServerError, BadRequest)
from astakos.im.settings import (
INVITATIONS_ENABLED, COOKIE_NAME, EMAILCHANGE_ENABLED, QUOTAHOLDER_URL)
INVITATIONS_ENABLED, COOKIE_NAME, EMAILCHANGE_ENABLED, QUOTAHOLDER_URL,
PROJECTS_VISIBLE)
from astakos.im.forms import FeedbackForm
from astakos.im.functions import send_feedback as send_feedback_func
......@@ -156,7 +157,7 @@ def get_menu(request, with_extra_links=False, with_signout=True):
append(item(
url=absolute(request, reverse('resource_usage')),
name="Usage"))
if QUOTAHOLDER_URL:
if QUOTAHOLDER_URL and PROJECTS_VISIBLE:
append(item(
url=absolute(request, reverse('project_list')),
name="Projects"))
......
......@@ -334,6 +334,7 @@ ACTIVATION_REDIRECT_URL = getattr(settings,
'ASTAKOS_ACTIVATION_REDIRECT_URL',
"/im/landing")
# If true, this enables a ui compatibility layer for the introduction of UUIDs
# in identity management. WARNING: Setting to True will break your installation.
TRANSLATE_UUIDS = getattr(settings, 'ASTAKOS_TRANSLATE_UUIDS', False)
......@@ -361,7 +362,9 @@ GOOGLE_SECRET = getattr(settings, 'ASTAKOS_GOOGLE_SECRET', '')
LINKEDIN_TOKEN = getattr(settings, 'ASTAKOS_LINKEDIN_TOKEN', '')
LINKEDIN_SECRET = getattr(settings, 'ASTAKOS_LINKEDIN_SECRET', '')
# Where to redirect the user after successful login when no next parameter is
# set
# URL to redirect the user after successful login when no next parameter is set
LOGIN_SUCCESS_URL = getattr(settings, 'ASTAKOS_LOGIN_SUCCESS_URL',
'/im/landing')
# Whether or not to display projects in astakos menu
PROJECTS_VISIBLE = getattr(settings, 'ASTAKOS_PROJECTS_VISIBLE', False)
......@@ -307,3 +307,9 @@
# OAuth2 LinkedIn credentials.
#ASTAKOS_LINKEDIN_TOKEN = ''
#ASTAKOS_LINKEDIN_SECRET = ''
# URL to redirect the user after successful login when no next parameter is set
# ASTAKOS_LOGIN_SUCCESS_URL = '/im/landing'
# Whether or not to display projects in astakos menu
# ASTAKOS_PROJECTS_VISIBLE = False
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment