source: TI12-security/branches/BODC/NDG/TestUserRoles.py @ 614

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/branches/BODC/NDG/TestUserRoles.py@614
Revision 614, 1006 bytes checked in by pjkersha, 14 years ago (diff)

Example test stub for user roles interface.

RevLine 
[614]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                                                                               
6P J Kershaw 29/07/05
7                                                                               
8Copyright (C) 2005 CCLRC & NERC
9                                                                               
10This software may be distributed under the terms of the Q Public License,
11version 1.0 or later.
12"""
13cvsID = '$Id'
14
15
16from AttAuthority 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 usrIsRegistered(self, dn):
27        return True
28
29
30    def getRoles(self, dn):
31        return ['staff', 'postdoc', 'undergrad'] 
Note: See TracBrowser for help on using the repository browser.