apm_mount_core_packages (private)

 apm_mount_core_packages

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

Mount, and set permissions for a number of packages part of the OpenACS core. The packages are singletons that have already been instantiated during installation. The main site needs to have been set up prior to invoking this proc.

The reason mounting is done here and not via the auto-mount feature of the APM is that there is a circular dependency between acs-subsite and acs-content-repository. The package acs-subsite requires acs-content-repository and so we cannot install acs-subsite before acs-content-repository in order to be able to mount acs-content-repository.

Author:
Peter Marklund
See Also:

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) site_node::instantiate_and_mount site_node::instantiate_and_mount (public) apm_mount_core_packages apm_mount_core_packages apm_mount_core_packages->acs_magic_object apm_mount_core_packages->permission::grant apm_mount_core_packages->permission::set_not_inherit apm_mount_core_packages->site_node::instantiate_and_mount

Testcases:
No testcase defined.
Source code:
    ns_log Notice "apm_mount_core_packages: Starting mounting of core packages"

    # Mount acs-lang
    ns_log Notice "apm_mount_core_packages: Mounting acs-lang"
    set acs_lang_id [site_node::instantiate_and_mount -package_key acs-lang]
    permission::grant -party_id [acs_magic_object the_public]  -object_id $acs_lang_id  -privilege read

    # Mount acs-admin
    ns_log Notice "apm_mount_core_packages: Mounting acs-admin"
    site_node::instantiate_and_mount -package_key acs-admin

    # Mount acs-service-contract
    ns_log Notice "apm_mount_core_packages: Mounting acs-service-contract"
    site_node::instantiate_and_mount -package_key acs-service-contract

    # Mount the acs-content-repository
    ns_log Notice "apm_mount_core_packages: Mounting acs-content-repository"
    site_node::instantiate_and_mount -package_key acs-content-repository

    # Mount acs-core-docs
    ns_log Notice "apm_mount_core_packages: Mounting acs-core-docs"
    site_node::instantiate_and_mount -node_name doc  -package_key acs-core-docs

    # Mount the acs-api-browser
    ns_log Notice "apm_mount_core_packages: Mounting acs-api-browser"
    set api_browser_package_id  [site_node::instantiate_and_mount -node_name api-doc  -package_key acs-api-browser]
    #
    # Over many years, all "Registered Users" got per default access
    # to /api-doc. This is probably OK, when one assumes that the
    # registered users are developers. However, providing source code
    # access to all registered users can pose a security thread,
    # especially on large sites. By deactivating the following line,
    # just "Main Site Administrators" will have rights on the
    # /api-doc, which is probably the right thing to do on most sites.
    # With the new permissions interface, providing more liberal rights via is
    #
    if {0} {
        # Only registered users should have permission to access the
        # api-browser
        #
        permission::grant -party_id [acs_magic_object registered_users]  -object_id $api_browser_package_id  -privilege read
    }
    #
    # Do not inherit from the parent object (if set).
    #
    permission::set_not_inherit -object_id $api_browser_package_id

    # Mount acs-automated-testing
    ns_log Notice "apm_mount_core_packages: Mounting acs-automated-testing"
    site_node::instantiate_and_mount -node_name test  -package_key acs-automated-testing

    ns_log Notice "apm_mount_core_packages: Finished mounting of core packages"
Generic XQL file:
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

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