acs-private-data-procs.tcl

Tcl procs for managing privacy

Location:
packages/acs-tcl/tcl/acs-private-data-procs.tcl
Created:
2000-12-02
Author:
ben@openforce.net
CVS Identification:
$Id: acs-private-data-procs.tcl,v 1.11 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

acs_privacy::privacy_control_enabled_p (public, deprecated)

 acs_privacy::privacy_control_enabled_p
Deprecated. Invoking this procedure generates a warning.

Returns whether privacy control is turned on or not. This is provided in order to have complete backwards compatibility with past behaviors, where private information was in no way regulated. DEPRECATED: this privacy feature was only used in the context of dotlrn, which also has an own set of apis for a similar purpose.

See Also:
  • dotlrn

Partial Call Graph (max 5 caller/called nodes):
%3 acs_privacy::user_can_read_private_data_p acs_privacy::user_can_read_private_data_p (public, deprecated) acs_privacy::privacy_control_enabled_p acs_privacy::privacy_control_enabled_p acs_privacy::user_can_read_private_data_p->acs_privacy::privacy_control_enabled_p ad_acs_kernel_id ad_acs_kernel_id (public) acs_privacy::privacy_control_enabled_p->ad_acs_kernel_id ad_log_deprecated ad_log_deprecated (public) acs_privacy::privacy_control_enabled_p->ad_log_deprecated parameter::get parameter::get (public) acs_privacy::privacy_control_enabled_p->parameter::get

Testcases:
No testcase defined.

acs_privacy::privacy_control_set (public, deprecated)

 acs_privacy::privacy_control_set val
Deprecated. Invoking this procedure generates a warning.

set the privacy control DEPRECATED: this privacy feature was only used in the context of dotlrn, which also has an own set of apis for a similar purpose.

Parameters:
val (required)
See Also:
  • dotlrn

Partial Call Graph (max 5 caller/called nodes):
%3 ad_acs_kernel_id ad_acs_kernel_id (public) ad_log_deprecated ad_log_deprecated (public) parameter::set_value parameter::set_value (public) acs_privacy::privacy_control_set acs_privacy::privacy_control_set acs_privacy::privacy_control_set->ad_acs_kernel_id acs_privacy::privacy_control_set->ad_log_deprecated acs_privacy::privacy_control_set->parameter::set_value

Testcases:
No testcase defined.

acs_privacy::set_user_read_private_data (public, deprecated)

 acs_privacy::set_user_read_private_data -user_id user_id \
    -object_id object_id -value value
Deprecated. Invoking this procedure generates a warning.

grant permission to access private data DEPRECATED: this privacy feature was only used in the context of dotlrn, which also has an own set of apis for a similar purpose.

Switches:
-user_id (required)
-object_id (required)
-value (required)
See Also:
  • dotlrn

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) permission::grant permission::grant (public) permission::revoke permission::revoke (public) acs_privacy::set_user_read_private_data acs_privacy::set_user_read_private_data acs_privacy::set_user_read_private_data->ad_log_deprecated acs_privacy::set_user_read_private_data->permission::grant acs_privacy::set_user_read_private_data->permission::revoke

Testcases:
No testcase defined.

acs_privacy::user_can_read_private_data_p (public, deprecated)

 acs_privacy::user_can_read_private_data_p [ -user_id user_id ] \
    -object_id object_id
Deprecated. Invoking this procedure generates a warning.

check if a user can access an object's private data DEPRECATED: this privacy feature was only used in the context of dotlrn, which also has an own set of apis for a similar purpose.

Switches:
-user_id (optional)
-object_id (required)
See Also:
  • dotlrn

Partial Call Graph (max 5 caller/called nodes):
%3 acs_privacy::privacy_control_enabled_p acs_privacy::privacy_control_enabled_p (public, deprecated) ad_log_deprecated ad_log_deprecated (public) permission::permission_p permission::permission_p (public) acs_privacy::user_can_read_private_data_p acs_privacy::user_can_read_private_data_p acs_privacy::user_can_read_private_data_p->acs_privacy::privacy_control_enabled_p acs_privacy::user_can_read_private_data_p->ad_log_deprecated acs_privacy::user_can_read_private_data_p->permission::permission_p

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

ad_library {
    Tcl procs for managing privacy

    @author ben@openforce.net
    @creation-date 2000-12-02
    @cvs-id $Id: acs-private-data-procs.tcl,v 1.11 2024/09/11 06:15:48 gustafn Exp $
}

namespace eval acs_privacy {

    ad_proc -deprecated privacy_control_enabled_p {} {
        Returns whether privacy control is turned on or not.
        This is provided in order to have complete backwards
        compatibility with past behaviors, where private information
        was in no way regulated.

        DEPRECATED: this privacy feature was only used in the context
        of dotlrn, which also has an own set of apis for a similar
        purpose.

        @see dotlrn
    } {
        # If no parameter set, then we assume privacy control is DISABLED
        return [parameter::get -package_id [ad_acs_kernel_id] -parameter PrivacyControlEnabledP -default 0]
    }

    ad_proc -deprecated privacy_control_set {val} {
        set the privacy control

        DEPRECATED: this privacy feature was only used in the context
        of dotlrn, which also has an own set of apis for a similar
        purpose.

        @see dotlrn
    } {
        return [parameter::set_value -value $val -package_id [ad_acs_kernel_id] -parameter PrivacyControlEnabledP]
    }

    d_proc -deprecated user_can_read_private_data_p {
        {-user_id ""}
        {-object_id:required}
    } {
        check if a user can access an object's private data

        DEPRECATED: this privacy feature was only used in the context
        of dotlrn, which also has an own set of apis for a similar
        purpose.

        @see dotlrn
    } {
        if {[privacy_control_enabled_p]} {
            return [permission::permission_p -party_id $user_id -object_id $object_id -privilege read_private_data]
        } else {
            # backwards compatibility
            return 1
        }
    }

    d_proc -deprecated set_user_read_private_data {
        {-user_id:required}
        {-object_id:required}
        {-value:required}
    } {
        grant permission to access private data

        DEPRECATED: this privacy feature was only used in the context
        of dotlrn, which also has an own set of apis for a similar
        purpose.

        @see dotlrn
    } {
        if { [string is true -strict $value] } {
            permission::grant -party_id $user_id -object_id $object_id -privilege read_private_data
        } else {
            permission::revoke -party_id $user_id -object_id $object_id -privilege read_private_data
        }
    }
}

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: