calendar::assign_permissions (public, deprecated)

 calendar::assign_permissions calendar_id party_id cal_privilege \
    [ revoke ]

Defined in packages/calendar/tcl/calendar-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Given a calendar_id, party_id and a permission this proc will assign the permission to the party the legal permissions are: public, private, calendar_read, calendar_write, calendar_delete If the revoke is set, then the given permission will be removed for the party. DEPRECATED: this api is a trivial wrapper to the permission api

Parameters:
calendar_id (required)
party_id (required)
cal_privilege (required)
revoke (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 calendar_assign_permissions calendar_assign_permissions (public, deprecated) calendar::assign_permissions calendar::assign_permissions calendar_assign_permissions->calendar::assign_permissions acs_magic_object acs_magic_object (public) calendar::assign_permissions->acs_magic_object ad_log_deprecated ad_log_deprecated (public) calendar::assign_permissions->ad_log_deprecated permission::grant permission::grant (public) calendar::assign_permissions->permission::grant permission::revoke permission::revoke (public) calendar::assign_permissions->permission::revoke

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc calendar::assign_permissions
    # Default privilege is being able to read.

    # If the permission is public, assign the magic object and set
    # permission to read.

    if {$cal_privilege eq "public"} {
        set party_id [acs_magic_object "the_public"]
        set cal_privilege "calendar_read"
    } elseif {$cal_privilege eq "private"} {
        set cal_privilege "calendar_read"
    }

    if { $revoke eq "" } {
        # grant the permissions
        permission::grant -object_id $calendar_id -party_id $party_id -privilege $cal_privilege
    } elseif {$revoke eq "revoke"} {
        # revoke the permissions
        permission::revoke -object_id $calendar_id -party_id $party_id -privilege $cal_privilege
    }
Generic XQL file:
packages/calendar/tcl/calendar-procs.xql

PostgreSQL XQL file:
packages/calendar/tcl/calendar-procs-postgresql.xql

Oracle XQL file:
packages/calendar/tcl/calendar-procs-oracle.xql

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