X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Finstitution.py;h=6dd1b20a0e8fca35119313e0ad617cd70c1b07a8;hb=2f20164b6a748feeef9a7dd88d901702168f380f;hp=4ee9016ba5e86398fa0d2473845b4f1aa8046d27;hpb=c6e7d96ca337b7227840b574027b10a00580cb0e;p=myslice.git diff --git a/portal/institution.py b/portal/institution.py index 4ee9016b..6dd1b20a 100644 --- a/portal/institution.py +++ b/portal/institution.py @@ -5,7 +5,7 @@ from django.template import RequestContext from django.shortcuts import render_to_response from django.shortcuts import render -from unfold.loginrequired import FreeAccessView +from unfold.loginrequired import LoginRequiredAutoLogoutView from manifold.core.query import Query from manifoldapi.manifoldapi import execute_query @@ -16,7 +16,7 @@ from myslice.configengine import ConfigEngine from myslice.theme import ThemeView import json -class InstitutionView (FreeAccessView, ThemeView): +class InstitutionView (LoginRequiredAutoLogoutView, ThemeView): template_name = 'institution.html' # expose this so we can mention the backend URL on the welcome page @@ -66,7 +66,7 @@ class InstitutionView (FreeAccessView, ThemeView): if 'myslice' in platform_detail['platform']: acc_auth_cred = account_config.get('delegated_authority_credentials','N/A') # assigning values - if acc_auth_cred == {}: + if acc_auth_cred == {} or acc_auth_cred == 'N/A': pi = "is_not_pi" else: pi = "is_pi" @@ -75,6 +75,7 @@ class InstitutionView (FreeAccessView, ThemeView): env['person'] = None env['theme'] = self.theme + env['section'] = "Institution" env['pi'] = pi env['username']=the_user(request) env['topmenu_items'] = topmenu_items(None, request)