apm-callback-procs.tcl

APM callbacks library

Location:
packages/acs-lang/tcl/apm-callback-procs.tcl
Created:
August 2009
Author:
Emmanuelle Raffenne <eraffenne@gmail.com>
CVS Identification:
$Id: apm-callback-procs.tcl,v 1.5 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

lang::apm::after_install (private)

 lang::apm::after_install

After install callback

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

lang::apm::after_mount (private)

 lang::apm::after_mount -package_id package_id -node_id node_id

Modify default permissions after mount to restrict read access to the package from public read to read access for registered users.

Switches:
-package_id (required)
-node_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 acs_magic_object acs_magic_object (public) permission::grant permission::grant (public) permission::set_not_inherit permission::set_not_inherit (public) lang::apm::after_mount lang::apm::after_mount lang::apm::after_mount->acs_magic_object lang::apm::after_mount->permission::grant lang::apm::after_mount->permission::set_not_inherit

Testcases:
No testcase defined.

lang::apm::after_upgrade (private)

 lang::apm::after_upgrade -from_version_name from_version_name \
    -to_version_name to_version_name

After upgrade callback for acs-lang

Switches:
-from_version_name (required)
-to_version_name (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_upgrade_logic apm_upgrade_logic (public) lang::apm::after_upgrade lang::apm::after_upgrade lang::apm::after_upgrade->apm_upgrade_logic

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

Content File Source

# /packages/acs-lang/tcl/apm-callback-procs.tcl

ad_library {

    APM callbacks library

    @creation-date August 2009
    @author  Emmanuelle Raffenne (eraffenne@gmail.com)
    @cvs-id $Id: apm-callback-procs.tcl,v 1.5 2024/09/11 06:15:48 gustafn Exp $

}

namespace eval lang {}
namespace eval lang::apm {}

d_proc -private lang::apm::after_install {
} {
    After install callback
} {

}

d_proc -private lang::apm::after_mount {
    -package_id:required
    -node_id:required
} {
    
    Modify default permissions after mount to restrict read access to
    the package from public read to read access for registered users.
    
} {
    #ns_log notice "-- After mount callback package_id $package_id node_id $node_id"
    
    #
    # Turn off inheritance from public site
    #
    permission::set_not_inherit -object_id $package_id
    #
    # Allow registered users to read
    #
    permission::grant -party_id [acs_magic_object registered_users] \
        -object_id $package_id \
        -privilege read
}

d_proc -private lang::apm::after_upgrade {
    {-from_version_name:required}
    {-to_version_name:required}
} {
    After upgrade callback for acs-lang
} {
    apm_upgrade_logic \
        -from_version_name $from_version_name \
        -to_version_name $to_version_name \
        -spec {
        }
}

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