/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
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>Module mod_acl_simple_roles</title>
- <link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
- </head>
- <body bgcolor="white">
- <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>
- <hr>
- <h1>Module mod_acl_simple_roles</h1>
- <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.
- <p>Copyright 2010 Marc Worrell
- Date: 2010-05-05</p>
- <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
- <h2><a name="description">Description</a></h2>Simple ACL module based on roles.
- <h2><a name="index">Function Index</a></h2>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- <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>
- </table>
- <h2><a name="functions">Function Details</a></h2>
- <h3 class="function"><a name="datamodel-0">datamodel/0</a></h3>
- <div class="spec">
- <p><tt>datamodel() -> any()</tt></p>
- </div><p>The datamodel for the role based ACL</p>
- <h3 class="function"><a name="observe_acl_can_see-2">observe_acl_can_see/2</a></h3>
- <div class="spec">
- <p><tt>observe_acl_can_see(X1, Context) -> any()</tt></p>
- </div><p>Return the max visible_for an user can see, used for pruning during searches</p>
- <h3 class="function"><a name="observe_acl_is_allowed-2">observe_acl_is_allowed/2</a></h3>
- <div class="spec">
- <p><tt>observe_acl_is_allowed(X1, Context) -> any()</tt></p>
- </div><p>Check if the user is allowed to perform Action on Object</p>
- <h3 class="function"><a name="observe_acl_logoff-2">observe_acl_logoff/2</a></h3>
- <div class="spec">
- <p><tt>observe_acl_logoff(X1, Context) -> any()</tt></p>
- </div><p>Let the user log off, clean up any cached information.</p>
- <h3 class="function"><a name="observe_acl_logon-2">observe_acl_logon/2</a></h3>
- <div class="spec">
- <p><tt>observe_acl_logon(X1, Context) -> any()</tt></p>
- </div><p>Let the user log on, this is the moment to start caching information.</p>
- <h3 class="function"><a name="observe_acl_rsc_update_check-3">observe_acl_rsc_update_check/3</a></h3>
- <div class="spec">
- <p><tt>observe_acl_rsc_update_check(X1, Props, Context) -> any()</tt></p>
- </div><p>Filter the properties before an update. Return filtered/updated resource proplist or
- the tuple {error, Reason}</p>
- <h3 class="function"><a name="observe_rsc_update-3">observe_rsc_update/3</a></h3>
- <div class="spec">
- <p><tt>observe_rsc_update(X1::{rsc_update, ResourceId, OldResourceProps}, X2::{Changed, UpdateProps}, Context) -> {NewChanged, NewUpdateProps}</tt></p>
- </div><p>Check if the update contains information for a acl role. If so then modify the acl role
- information so that it is easier to handle.</p>
- <hr>
- <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>
- <p><i>Generated by EDoc, Aug 12 2011, 19:36:11.</i></p>
- </body>
- </html>