install::xml::action::set-permission (public)

 install::xml::action::set-permission node

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

Sets permissions on an object.

<set-permissions grantee="party" privilege="package-key />

Parameters:
node (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_invoke_install_proc apm_invoke_install_proc (public) apm_required_attribute_value apm_required_attribute_value (public) permission::grant permission::grant (public) xml_node_get_children xml_node_get_children (public) xml_node_get_children_by_name xml_node_get_children_by_name (public) install::xml::action::set-permission install::xml::action::set-permission install::xml::action::set-permission->apm_invoke_install_proc install::xml::action::set-permission->apm_required_attribute_value install::xml::action::set-permission->permission::grant install::xml::action::set-permission->xml_node_get_children install::xml::action::set-permission->xml_node_get_children_by_name

Testcases:
No testcase defined.
Source code:
    set privileges [apm_required_attribute_value $node privilege]

    set privilege_list [split $privileges ","]

    set grantees_node [xml_node_get_children_by_name [lindex $node 0] grantee]
    set grantees [xml_node_get_children [lindex $grantees_node 0]]

    foreach grantee $grantees {
        set party_id [apm_invoke_install_proc -type object_id -node $grantee]

        set objects_node [xml_node_get_children_by_name [lindex $node 0] object]
        set objects [xml_node_get_children [lindex $objects_node 0]]

        foreach object $objects {
            set object_id [apm_invoke_install_proc -type object_id  -node $object]

            foreach privilege $privilege_list {
                permission::grant -object_id $object_id  -party_id $party_id  -privilege $privilege
            }
        }
    }
    return
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: