Permalink
Browse files

Added some comments.

  • Loading branch information...
1 parent d617737 commit 333d125e5a283e5f7ff5e1cda4d662d3c29a843b @mitar mitar committed Jul 23, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 componentpermissions/api.py
@@ -26,6 +26,8 @@ def _get_permission_name(self, component):
return None
def get_permission_actions(self):
+ """Return a list of actions defined by this component."""
+
yield 'COMPONENT_VIEW'
for component in model.Component.select(self.env):
@@ -36,6 +38,8 @@ def get_permission_actions(self):
# IPermissionPolicy methods
def check_permission(self, action, username, resource, perm):
+ """Check that the action can be performed by username on the resource."""
+
# To prevent recursion
if action in self.get_permission_actions():
return

0 comments on commit 333d125

Please sign in to comment.