source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/siteAAttributeAuthority/siteAUserRoles.py @ 4447

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/siteAAttributeAuthority/siteAUserRoles.py@4447
Revision 4447, 970 bytes checked in by pjkersha, 11 years ago (diff)
  • Updated Session Manager unit tests to include a call to a locally instantiated Attribute Authority
  • fixed bug in CredentialWallet?.getAttCert - ensure attributeAuthority keyword input correctly picked up.
Line 
1"""NDG Attribute Authority User Roles class - acts as an interface between
2the data centre's user roles configuration and the Attribute Authority
3                                                                               
4NERC Data Grid Project
5"""
6__author__ = "P J Kershaw"
7__date__ = "29/07/05"
8__copyright__ = "(C) 2007 STFC & NERC"
9__license__ = \
10"""This software may be distributed under the terms of the Q Public
11License, version 1.0 or later."""
12__contact__ = "Philip.Kershaw@stfc.ac.uk"
13__revision__ = '$Id:siteAUserRoles.py 4371 2008-10-29 09:44:51Z pjkersha $'
14
15
16from ndg.security.server.attributeauthority import AAUserRoles
17
18
19class TestUserRoles(AAUserRoles):
20    """Test User Roles class dynamic import for Attribute Authority"""
21
22    def __init__(self, propertiesFilePath=None):
23        pass
24
25
26    def userIsRegistered(self, userId):
27        return True
28
29
30    def getRoles(self, userId):
31        return ['staff', 'postdoc', 'undergrad', 'coapec'] 
Note: See TracBrowser for help on using the repository browser.