source: TI12-security/trunk/documentation/epydoc/ndg.security.server.conf.userRoles.UserRoles-class.html @ 4245

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/documentation/epydoc/ndg.security.server.conf.userRoles.UserRoles-class.html@4245
Revision 4245, 13.1 KB checked in by pjkersha, 11 years ago (diff)

Working unit tests for WSGI based Attribute Authority.

  • Altered so that all Attribute Config is picked up from the Paste ini file. Separate cfg or xml based config file is still supported.

TODO:

  • Simplify unit test config for client.
Line 
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>ndg.security.server.conf.userRoles.UserRoles</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33  <!-- Project homepage -->
34      <th class="navbar" align="right" width="100%">
35        <table border="0" cellpadding="0" cellspacing="0">
36          <tr><th class="navbar" align="center"
37            >NDG Security</th>
38          </tr></table></th>
39  </tr>
40</table>
41<table width="100%" cellpadding="0" cellspacing="0">
42  <tr valign="top">
43    <td width="100%">
44      <span class="breadcrumbs">
45        <a href="ndg-module.html">Package&nbsp;ndg</a> ::
46        <a href="ndg.security-module.html">Package&nbsp;security</a> ::
47        <a href="ndg.security.server-module.html">Package&nbsp;server</a> ::
48        <a href="ndg.security.server.conf-module.html">Package&nbsp;conf</a> ::
49        <a href="ndg.security.server.conf.userRoles-module.html">Module&nbsp;userRoles</a> ::
50        Class&nbsp;UserRoles
51      </span>
52    </td>
53    <td>
54      <table cellpadding="0" cellspacing="0">
55        <!-- hide/show private -->
56        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
57    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
58      </table>
59    </td>
60  </tr>
61</table>
62<!-- ==================== CLASS DESCRIPTION ==================== -->
63<h1 class="epydoc">Class UserRoles</h1><p class="nomargin-top"><span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles">source&nbsp;code</a></span></p>
64<center>
65<center>  <map id="uml_class_diagram_for_ndg_secu_223" name="uml_class_diagram_for_ndg_secu_223">
66<area shape="rect" href="ndg.security.server.AttAuthority.AAUserRoles&#45;class.html" title="An abstract base class to define the user roles interface to an Attribute Authority." alt="" coords="59,10,213,42"/>
67<area shape="rect" href="ndg.security.server.conf.userRoles.UserRoles&#45;class.html#__init__" title="Customize for example to initialise site user repository settings" alt="" coords="17,97,255,116"/>
68<area shape="rect" href="ndg.security.server.conf.userRoles.UserRoles&#45;class.html#userIsRegistered" title="Convenience method NOT used by Attribute Authority API" alt="" coords="17,116,255,134"/>
69<area shape="rect" href="ndg.security.server.conf.userRoles.UserRoles&#45;class.html#getRoles" title="Allocate required roles to user given by userId." alt="" coords="17,134,255,153"/>
70<area shape="rect" href="ndg.security.server.conf.userRoles.UserRoles&#45;class.html" title="User Roles class dynamic import for Attribute Authority." alt="" coords="16,72,256,154"/>
71</map>
72  <img src="uml_class_diagram_for_ndg_secu_223.gif" alt='' usemap="#uml_class_diagram_for_ndg_secu_223" ismap="ismap" class="graph-without-title" />
73</center>
74</center>
75<hr />
76<p>User Roles class dynamic import for Attribute Authority.  Customize
77  according to your site's user role allocation system</p>
78
79<!-- ==================== INSTANCE METHODS ==================== -->
80<a name="section-InstanceMethods"></a>
81<table class="summary" border="1" cellpadding="3"
82       cellspacing="0" width="100%" bgcolor="white">
83<tr bgcolor="#70b0f0" class="table-header">
84  <td colspan="2" class="table-header">
85    <table border="0" cellpadding="0" cellspacing="0" width="100%">
86      <tr valign="top">
87        <td align="left"><span class="table-header">Instance Methods</span></td>
88        <td align="right" valign="top"
89         ><span class="options">[<a href="#section-InstanceMethods"
90         class="privatelink" onclick="toggle_private();"
91         >hide private</a>]</span></td>
92      </tr>
93    </table>
94  </td>
95</tr>
96<tr>
97    <td width="15%" align="right" valign="top" class="summary">
98      <span class="summary-type">&nbsp;</span>
99    </td><td class="summary">
100      <table width="100%" cellpadding="0" cellspacing="0" border="0">
101        <tr>
102          <td><span class="summary-sig"><a href="ndg.security.server.conf.userRoles.UserRoles-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
103        <span class="summary-sig-arg">propertiesFilePath</span>=<span class="summary-sig-default">None</span>)</span><br />
104      Customize for example to initialise site user repository settings</td>
105          <td align="right" valign="top">
106            <span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.__init__">source&nbsp;code</a></span>
107           
108          </td>
109        </tr>
110      </table>
111     
112    </td>
113  </tr>
114<tr>
115    <td width="15%" align="right" valign="top" class="summary">
116      <span class="summary-type">bool</span>
117    </td><td class="summary">
118      <table width="100%" cellpadding="0" cellspacing="0" border="0">
119        <tr>
120          <td><span class="summary-sig"><a href="ndg.security.server.conf.userRoles.UserRoles-class.html#userIsRegistered" class="summary-sig-name">userIsRegistered</a>(<span class="summary-sig-arg">self</span>,
121        <span class="summary-sig-arg">userId</span>)</span><br />
122      Convenience method NOT used by Attribute Authority API</td>
123          <td align="right" valign="top">
124            <span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.userIsRegistered">source&nbsp;code</a></span>
125           
126          </td>
127        </tr>
128      </table>
129     
130    </td>
131  </tr>
132<tr>
133    <td width="15%" align="right" valign="top" class="summary">
134      <span class="summary-type">list</span>
135    </td><td class="summary">
136      <table width="100%" cellpadding="0" cellspacing="0" border="0">
137        <tr>
138          <td><span class="summary-sig"><a href="ndg.security.server.conf.userRoles.UserRoles-class.html#getRoles" class="summary-sig-name">getRoles</a>(<span class="summary-sig-arg">self</span>,
139        <span class="summary-sig-arg">userId</span>)</span><br />
140      Allocate required roles to user given by userId.</td>
141          <td align="right" valign="top">
142            <span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.getRoles">source&nbsp;code</a></span>
143           
144          </td>
145        </tr>
146      </table>
147     
148    </td>
149  </tr>
150</table>
151<!-- ==================== METHOD DETAILS ==================== -->
152<a name="section-MethodDetails"></a>
153<table class="details" border="1" cellpadding="3"
154       cellspacing="0" width="100%" bgcolor="white">
155<tr bgcolor="#70b0f0" class="table-header">
156  <td colspan="2" class="table-header">
157    <table border="0" cellpadding="0" cellspacing="0" width="100%">
158      <tr valign="top">
159        <td align="left"><span class="table-header">Method Details</span></td>
160        <td align="right" valign="top"
161         ><span class="options">[<a href="#section-MethodDetails"
162         class="privatelink" onclick="toggle_private();"
163         >hide private</a>]</span></td>
164      </tr>
165    </table>
166  </td>
167</tr>
168</table>
169<a name="__init__"></a>
170<div>
171<table class="details" border="1" cellpadding="3"
172       cellspacing="0" width="100%" bgcolor="white">
173<tr><td>
174  <table width="100%" cellpadding="0" cellspacing="0" border="0">
175  <tr valign="top"><td>
176  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
177        <span class="sig-arg">propertiesFilePath</span>=<span class="sig-default">None</span>)</span>
178    <br /><em class="fname">(Constructor)</em>
179  </h3>
180  </td><td align="right" valign="top"
181    ><span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.__init__">source&nbsp;code</a></span>&nbsp;
182    </td>
183  </tr></table>
184 
185  <p>Customize for example to initialise site user repository settings</p>
186  <dl class="fields">
187    <dt>Parameters:</dt>
188    <dd><ul class="nomargin-top">
189        <li><strong class="pname"><code>propertiesFilePath</code></strong> (string) - file path to a properties from which to initialise the user roles
190          interface. e.g. the file could contain user database settings. 
191          The file path passed corresponds to the userRolesPropFile element
192          in the attAuthorityProperties.xml file.</li>
193    </ul></dd>
194    <dt>Overrides:
195        <a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#__init__">AttAuthority.AAUserRoles.__init__</a>
196    </dt>
197  </dl>
198</td></tr></table>
199</div>
200<a name="userIsRegistered"></a>
201<div>
202<table class="details" border="1" cellpadding="3"
203       cellspacing="0" width="100%" bgcolor="white">
204<tr><td>
205  <table width="100%" cellpadding="0" cellspacing="0" border="0">
206  <tr valign="top"><td>
207  <h3 class="epydoc"><span class="sig"><span class="sig-name">userIsRegistered</span>(<span class="sig-arg">self</span>,
208        <span class="sig-arg">userId</span>)</span>
209  </h3>
210  </td><td align="right" valign="top"
211    ><span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.userIsRegistered">source&nbsp;code</a></span>&nbsp;
212    </td>
213  </tr></table>
214 
215  <p>Convenience method NOT used by Attribute Authority API</p>
216  <dl class="fields">
217    <dt>Parameters:</dt>
218    <dd><ul class="nomargin-top">
219        <li><strong class="pname"><code>userId</code></strong> (string) - identity of user to allocate roles to</li>
220    </ul></dd>
221    <dt>Returns: bool</dt>
222        <dd>True if user is registered</dd>
223    <dt>Overrides:
224        <a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#userIsRegistered">AttAuthority.AAUserRoles.userIsRegistered</a>
225    </dt>
226  </dl>
227</td></tr></table>
228</div>
229<a name="getRoles"></a>
230<div>
231<table class="details" border="1" cellpadding="3"
232       cellspacing="0" width="100%" bgcolor="white">
233<tr><td>
234  <table width="100%" cellpadding="0" cellspacing="0" border="0">
235  <tr valign="top"><td>
236  <h3 class="epydoc"><span class="sig"><span class="sig-name">getRoles</span>(<span class="sig-arg">self</span>,
237        <span class="sig-arg">userId</span>)</span>
238  </h3>
239  </td><td align="right" valign="top"
240    ><span class="codelink"><a href="ndg.security.server.conf.userRoles-pysrc.html#UserRoles.getRoles">source&nbsp;code</a></span>&nbsp;
241    </td>
242  </tr></table>
243 
244  <p>Allocate required roles to user given by userId.  Default to safe
245  option of returning no user roles i.e. an empty list: []</p>
246  <dl class="fields">
247    <dt>Parameters:</dt>
248    <dd><ul class="nomargin-top">
249        <li><strong class="pname"><code>userId</code></strong> (string) - identity of user to allocate roles to</li>
250    </ul></dd>
251    <dt>Returns: list</dt>
252        <dd>roles to which user is entitled</dd>
253    <dt>Overrides:
254        <a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#getRoles">AttAuthority.AAUserRoles.getRoles</a>
255    </dt>
256  </dl>
257</td></tr></table>
258</div>
259<br />
260<!-- ==================== NAVIGATION BAR ==================== -->
261<table class="navbar" border="0" width="100%" cellpadding="0"
262       bgcolor="#a0c0ff" cellspacing="0">
263  <tr valign="middle">
264  <!-- Home link -->
265      <th>&nbsp;&nbsp;&nbsp;<a
266        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
267
268  <!-- Tree link -->
269      <th>&nbsp;&nbsp;&nbsp;<a
270        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
271
272  <!-- Index link -->
273      <th>&nbsp;&nbsp;&nbsp;<a
274        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
275
276  <!-- Help link -->
277      <th>&nbsp;&nbsp;&nbsp;<a
278        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
279
280  <!-- Project homepage -->
281      <th class="navbar" align="right" width="100%">
282        <table border="0" cellpadding="0" cellspacing="0">
283          <tr><th class="navbar" align="center"
284            >NDG Security</th>
285          </tr></table></th>
286  </tr>
287</table>
288<table border="0" cellpadding="0" cellspacing="0" width="100%%">
289  <tr>
290    <td align="left" class="footer">
291    <a href="epydoc-log.html">Generated by Epydoc
292    3.0.1 on Thu Sep  4 09:37:50 2008</a>
293    </td>
294    <td align="right" class="footer">
295      <a target="mainFrame" href="http://epydoc.sourceforge.net"
296        >http://epydoc.sourceforge.net</a>
297    </td>
298  </tr>
299</table>
300
301<script type="text/javascript">
302  <!--
303  // Private objects are initially displayed (because if
304  // javascript is turned off then we want them to be
305  // visible); but by default, we want to hide them.  So hide
306  // them unless we have a cookie that says to show them.
307  checkCookie();
308  // -->
309</script>
310</body>
311</html>
Note: See TracBrowser for help on using the repository browser.