ds_require_permission (private)
ds_require_permission object_id privilege
Defined in packages/acs-developer-support/tcl/acs-developer-support-procs.tcl
Requires the user identified by ds_add_conn user_id to have the given privilege on the given object.
- Parameters:
- object_id (required)
- privilege (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set user_id [ds_ad_conn user_id] if {![permission::permission_p -party_id $user_id -object_id $object_id -privilege $privilege]} { if {$user_id == 0} { auth::require_login } else { ns_log Warning "$user_id doesn't have $privilege on object $object_id" ad_return_forbidden "Permission Denied" "<blockquote> <p>You don't have permission to $privilege [acs_object_name $object_id].</p> </blockquote>" } ad_script_abort }XQL Not present: Generic, PostgreSQL, Oracle