Ignore:
Timestamp:
16/11/07 14:03:39 (12 years ago)
Author:
pjkersha
Message:

Include organisation name in login info on NDG page bottom panel.

ows_server/ows_server/controllers/login.py: add attCert.issuerName into org key of security session info
ows_server/ows_server/lib/security_util.py: add 'org' to security session keys
ows_server/ows_server/templates/ndgPage.kid: change logged in message to include org.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/login.py

    r2959 r3019  
    115115        log.debug('Completing login...') 
    116116         
    117         # Make session 
    118         # 
    119         # Security credentials - proxyCert, userCert, ProxyPriKey and sessID 
    120         # could be held in the session but how secure is 
    121          
    122         # Make a security cookie here ... 
     117        # Make security session details 
    123118        setSecuritySession(h=g.securityCfg.smURI, 
    124119                           u=username, 
     120                           org=attCert.issuerName, 
    125121                           roles=attCert.roles, 
    126122                           sid=sessID) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/security_util.py

    r2959 r3019  
    2525     
    2626    @type subKeys: tuple 
    27     @cvar subKeys: list of valid security keys to set""" 
     27    @cvar subKeys: list of valid security keys to set h = session manager 
     28    address, sid = session ID, u = username, org = organisation where user is 
     29    logged in, roles = the roles the user is entitled to at org""" 
    2830     
    2931    key = 'ndgSec' 
    30     subKeys = ('h', 'sid', 'u', 'roles') 
     32    subKeys = ('h', 'sid', 'u', 'org', 'roles') 
    3133 
    3234    def __init__(self, **subKeys): 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid

    r2976 r3019  
    149149                    <div id="loginStatus"> 
    150150                        <!--! now we choose one of the next two (logged in or not) --> 
    151                         <div py:if="'ndgSec' in session"><table><tbody><tr><td> User [${session['ndgSec']['u']}] logged in 
    152                         with roles [${len(session['ndgSec']['roles'])==1 and session['ndgSec']['roles'][0] or ', '.join(session['ndgSec']['roles'])}]</td><td> 
     151                        <div py:if="'ndgSec' in session"><table><tbody><tr><td>  
     152                        User [${session['ndgSec']['u']}] logged in at  
     153                        ${session['ndgSec']['org']} with roles  
     154                        [${len(session['ndgSec']['roles'])==1 and session['ndgSec']['roles'][0] or ', '.join(session['ndgSec']['roles'])}]</td><td> 
    153155                        &nbsp;<span py:replace="logOut()"/></td></tr></tbody></table></div> 
    154156                        <div py:if="'ndgSec' not in session">Further services maybe available if you can 
Note: See TracChangeset for help on using the changeset viewer.