xo::Policy instproc enforce_permissions (public)

 <instance of xo::Policy[i]> enforce_permissions \
    [ -user_id user_id ] [ -package_id package_id ] object method

Defined in /var/www/openacs.org/packages/xotcl-core/tcl/policy-procs.tcl

This method checks whether the current user is allowed or not to invoke a method based on the given policy and forces logins if required.

Switches:
-user_id (optional, integer)
-package_id (optional, integer)
Parameters:
object (required, object)
method (required)
Returns:
0 or 1
See Also:
  • check_permissions

Testcases:
xowiki_test_cases
[ show source ]
Show another procedure: