xo::db::CrItem instproc privilege=creator (public)
<instance of xo::db::CrItem> privilege=creator [ -login login ] \ user_id package_id method
Defined in packages/xotcl-core/tcl/cr-procs.tcl
Define an object specific privilege to be used in the policies. Grant access to a content item for the creator (creation_user) of the item, and for the package admin.
- Switches:
- -login
(defaults to"true"
) (optional)- Parameters:
- user_id
package_id
method
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set allowed 0 # :log "--checking privilege [self args]" if {[info exists :creation_user]} { if {${:creation_user} == $user_id} { set allowed 1 } else { # allow the package admin always access set allowed [::xo::cc permission -object_id $package_id -party_id $user_id -privilege admin] } } return $allowedXQL Not present: Generic, PostgreSQL, Oracle