Package turbogears :: Package identity :: Module conditions
[hide private]

Module conditions

source code

Classes [hide private]
  Predicate
Generic base class for testing true or false for a condition.
  CompoundPredicate
A predicate composed of other predicates.
  All
A compound predicate that evaluates to true only if all sub-predicates evaluate to true for the given input.
  Any
A compound predicate that evaluates to true if any one of its sub-predicates evaluates to true.
  IdentityPredicateHelper
A mix-in helper class for Identity Predicates.
  in_group
Predicate for requiring a group.
  in_all_groups
Predicate for requiring membership in a number of groups.
  in_any_group
Predicate for requiring membership in at least one group
  not_anonymous
Predicate for checking whether current visitor is anonymous.
  has_permission
Predicate for checking whether the visitor has a particular permission.
  has_all_permissions
Predicate for checking whether the visitor has all permissions.
  has_any_permission
Predicate for checking whether the visitor has at least one permission.
  from_host
Predicate for checking whether the visitor's host is an allowed host.
  from_any_host
Predicate for checking whether the visitor's host is one of a number of permitted hosts.
  SecureResource
  SecureObject
Functions [hide private]
 
_remoteHost() source code
 
_match_ip(cidr, ip) source code
 
require(predicate, obj=None)
Function decorator that checks whether the current user is a member of the groups specified and has the permissions required.
source code
 
_secureResourceDecorator(fn)
A decorator function used by the SecureResourceMeta metaclass.
source code
 
_check_method(obj, fn, predicate) source code
Variables [hide private]
  log = logging.getLogger("turbogears.identity")