/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. <h1>Module mod_acl_simple_roles</h1>
  11. <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.
  12. <p>Copyright Š 2010 Marc Worrell
  13. Date: 2010-05-05</p>
  14. <p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
  15. <h2><a name="description">Description</a></h2>Simple ACL module based on roles.
  16. <h2><a name="index">Function Index</a></h2>
  17. <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>
  18. <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>
  19. <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>
  20. <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>
  21. <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>
  22. <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>
  23. <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>
  24. </table>
  25. <h2><a name="functions">Function Details</a></h2>
  26. <h3 class="function"><a name="datamodel-0">datamodel/0</a></h3>
  27. <div class="spec">
  28. <p><tt>datamodel() -&gt; any()</tt></p>
  29. </div><p>The datamodel for the role based ACL</p>
  30. <h3 class="function"><a name="observe_acl_can_see-2">observe_acl_can_see/2</a></h3>
  31. <div class="spec">
  32. <p><tt>observe_acl_can_see(X1, Context) -&gt; any()</tt></p>
  33. </div><p>Return the max visible_for an user can see, used for pruning during searches</p>
  34. <h3 class="function"><a name="observe_acl_is_allowed-2">observe_acl_is_allowed/2</a></h3>
  35. <div class="spec">
  36. <p><tt>observe_acl_is_allowed(X1, Context) -&gt; any()</tt></p>
  37. </div><p>Check if the user is allowed to perform Action on Object</p>
  38. <h3 class="function"><a name="observe_acl_logoff-2">observe_acl_logoff/2</a></h3>
  39. <div class="spec">
  40. <p><tt>observe_acl_logoff(X1, Context) -&gt; any()</tt></p>
  41. </div><p>Let the user log off, clean up any cached information.</p>
  42. <h3 class="function"><a name="observe_acl_logon-2">observe_acl_logon/2</a></h3>
  43. <div class="spec">
  44. <p><tt>observe_acl_logon(X1, Context) -&gt; any()</tt></p>
  45. </div><p>Let the user log on, this is the moment to start caching information.</p>
  46. <h3 class="function"><a name="observe_acl_rsc_update_check-3">observe_acl_rsc_update_check/3</a></h3>
  47. <div class="spec">
  48. <p><tt>observe_acl_rsc_update_check(X1, Props, Context) -&gt; any()</tt></p>
  49. </div><p>Filter the properties before an update. Return filtered/updated resource proplist or
  50. the tuple {error, Reason}</p>
  51. <h3 class="function"><a name="observe_rsc_update-3">observe_rsc_update/3</a></h3>
  52. <div class="spec">
  53. <p><tt>observe_rsc_update(X1::{rsc_update, ResourceId, OldResourceProps}, X2::{Changed, UpdateProps}, Context) -&gt; {NewChanged, NewUpdateProps}</tt></p>
  54. </div><p>Check if the update contains information for a acl role. If so then modify the acl role
  55. information so that it is easier to handle.</p>
  56. <hr>
  57. <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>
  58. <p><i>Generated by EDoc, Aug 12 2011, 19:36:11.</i></p>
  59. </body>
  60. </html>