source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthority/siteA/siteAUserRoles.py @ 4654

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/attributeauthority/siteA/siteAUserRoles.py@4667
Revision 4654, 970 bytes checked in by pjkersha, 11 years ago (diff)

#884: add capability to X509Cert.isValidTime to warn when X.509 certificates are due to expire within a certain time limit (default 30 days). isValidTime is now called from read and parsing routines. warnings.warn and logging.warning are called so logs from security services will display the messages.

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.