permission::require_permission (public)
permission::require_permission [ -party_id party_id ] \ -object_id object_id -privilege privilege
Defined in packages/acs-tcl/tcl/acs-permissions-procs.tcl
require that party X have privilege Y on object Z
- Switches:
- -party_id
(optional)- -object_id
(required)- -privilege
(required)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {$party_id eq ""} { set party_id [ad_conn user_id] } if {![permission_p -party_id $party_id -object_id $object_id -privilege $privilege]} { if {!$party_id && ![ad_conn ajax_p]} { auth::require_login } else { set message [string cat "permission::require_permission: " "$party_id doesn't have privilege $privilege " "on object '$object_id'"] if {$object_id eq ""} { ad_log error $message } else { ns_log notice $message } ad_return_forbidden "Permission Denied" "You don't have permission to $privilege on object $object_id." } ad_script_abort }Generic XQL file: packages/acs-tcl/tcl/acs-permissions-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/acs-permissions-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/acs-permissions-procs-oracle.xql