xo::Policy instproc check_permissions (public)

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

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

This method checks whether the current or specified user is allowed to invoke a method based on the given policy. This method is purely checking and does not force logins or other side effects. It can be safely used for example to check whether links should be shown or not.

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

Testcases:
xowiki_test_cases
[ show source ]
Show another procedure: