PageRenderTime 80ms CodeModel.GetById 66ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/modules/mod_acl_simple_roles/mod_acl_simple_roles.html

https://code.google.com/p/zotonic/
HTML | 72 lines | 60 code | 12 blank | 0 comment | 0 complexity | 4995c6ced98656f34c22cb989154c9d7 MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 2<html>
 3<head>
 4<title>Module mod_acl_simple_roles</title>
 5<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
 6</head>
 7<body bgcolor="white">
 8<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
 9<hr>
10
11<h1>Module mod_acl_simple_roles</h1>
12<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Simple ACL module based on roles.
13<p>Copyright Š 2010 Marc Worrell
14  Date: 2010-05-05</p>
15
16<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
17
18<h2><a name="description">Description</a></h2>Simple ACL module based on roles.
19<h2><a name="index">Function Index</a></h2>
20<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#datamodel-0">datamodel/0</a></td><td>The datamodel for the role based ACL.</td></tr>
21<tr><td valign="top"><a href="#observe_acl_can_see-2">observe_acl_can_see/2</a></td><td>Return the max visible_for an user can see, used for pruning during searches.</td></tr>
22<tr><td valign="top"><a href="#observe_acl_is_allowed-2">observe_acl_is_allowed/2</a></td><td>Check if the user is allowed to perform Action on Object.</td></tr>
23<tr><td valign="top"><a href="#observe_acl_logoff-2">observe_acl_logoff/2</a></td><td>Let the user log off, clean up any cached information.</td></tr>
24<tr><td valign="top"><a href="#observe_acl_logon-2">observe_acl_logon/2</a></td><td>Let the user log on, this is the moment to start caching information.</td></tr>
25<tr><td valign="top"><a href="#observe_acl_rsc_update_check-3">observe_acl_rsc_update_check/3</a></td><td>Filter the properties before an update.</td></tr>
26<tr><td valign="top"><a href="#observe_rsc_update-3">observe_rsc_update/3</a></td><td>Check if the update contains information for a acl role.</td></tr>
27</table>
28
29<h2><a name="functions">Function Details</a></h2>
30
31<h3 class="function"><a name="datamodel-0">datamodel/0</a></h3>
32<div class="spec">
33<p><tt>datamodel() -&gt; any()</tt></p>
34</div><p>The datamodel for the role based ACL</p>
35
36<h3 class="function"><a name="observe_acl_can_see-2">observe_acl_can_see/2</a></h3>
37<div class="spec">
38<p><tt>observe_acl_can_see(X1, Context) -&gt; any()</tt></p>
39</div><p>Return the max visible_for an user can see, used for pruning during searches</p>
40
41<h3 class="function"><a name="observe_acl_is_allowed-2">observe_acl_is_allowed/2</a></h3>
42<div class="spec">
43<p><tt>observe_acl_is_allowed(X1, Context) -&gt; any()</tt></p>
44</div><p>Check if the user is allowed to perform Action on Object</p>
45
46<h3 class="function"><a name="observe_acl_logoff-2">observe_acl_logoff/2</a></h3>
47<div class="spec">
48<p><tt>observe_acl_logoff(X1, Context) -&gt; any()</tt></p>
49</div><p>Let the user log off, clean up any cached information.</p>
50
51<h3 class="function"><a name="observe_acl_logon-2">observe_acl_logon/2</a></h3>
52<div class="spec">
53<p><tt>observe_acl_logon(X1, Context) -&gt; any()</tt></p>
54</div><p>Let the user log on, this is the moment to start caching information.</p>
55
56<h3 class="function"><a name="observe_acl_rsc_update_check-3">observe_acl_rsc_update_check/3</a></h3>
57<div class="spec">
58<p><tt>observe_acl_rsc_update_check(X1, Props, Context) -&gt; any()</tt></p>
59</div><p>Filter the properties before an update. Return filtered/updated resource proplist or
60  the tuple {error, Reason}</p>
61
62<h3 class="function"><a name="observe_rsc_update-3">observe_rsc_update/3</a></h3>
63<div class="spec">
64<p><tt>observe_rsc_update(X1::{rsc_update, ResourceId, OldResourceProps}, X2::{Changed, UpdateProps}, Context) -&gt; {NewChanged, NewUpdateProps}</tt></p>
65</div><p>Check if the update contains information for a acl role.  If so then modify the acl role
66  information so that it is easier to handle.</p>
67<hr>
68
69<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
70<p><i>Generated by EDoc, Aug 12 2011, 19:36:11.</i></p>
71</body>
72</html>