permission::require_write_permission (public)

 permission::require_write_permission -object_id object_id \
    [ -creation_user creation_user ] [ -party_id party_id ] \
    [ -action action ]

Defined in packages/acs-tcl/tcl/acs-permissions-procs.tcl

If the user is not allowed to edit this object, returns a permission denied page.

Switches:
-object_id (required)
-creation_user (optional)
Optionally specify creation_user directly as an optimization. Otherwise a query will be executed.
-party_id (optional)
The party to have or not have write permission.
-action (optional, defaults to "edit")
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-core-docs/www/files/tutorial/note-delete.tcl packages/acs-core-docs/ www/files/tutorial/note-delete.tcl permission::require_write_permission permission::require_write_permission packages/acs-core-docs/www/files/tutorial/note-delete.tcl->permission::require_write_permission packages/acs-core-docs/www/files/tutorial/note-edit.tcl packages/acs-core-docs/ www/files/tutorial/note-edit.tcl packages/acs-core-docs/www/files/tutorial/note-edit.tcl->permission::require_write_permission packages/oct-election/www/election-edit.tcl packages/oct-election/ www/election-edit.tcl packages/oct-election/www/election-edit.tcl->permission::require_write_permission packages/xowiki/www/admin/delete-type.tcl packages/xowiki/ www/admin/delete-type.tcl packages/xowiki/www/admin/delete-type.tcl->permission::require_write_permission ad_return_forbidden ad_return_forbidden (public) permission::require_write_permission->ad_return_forbidden ad_script_abort ad_script_abort (public) permission::require_write_permission->ad_script_abort permission::write_permission_p permission::write_permission_p (public) permission::require_write_permission->permission::write_permission_p

Testcases:
No testcase defined.
Source code:
    if { ![permission::write_permission_p -object_id $object_id -party_id $party_id] } {
        ad_return_forbidden  "Permission Denied"  "You don't have permission to $action this object."
        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

[ hide source ] | [ make this the default ]
Show another procedure: