application_group::group_id_from_package_id (public)

 application_group::group_id_from_package_id [ -no_complain ] \
    [ -package_id package_id ]

Defined in packages/acs-subsite/tcl/application-group-procs.tcl

Get the application_group of a package. By default, if no application group exists, we throw an error. The -no_complain flag will prevent the error from being thrown, in which case you'll just get an empty string if the application group doesn't exist.

Switches:
-no_complain (optional, boolean)
-package_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_expose_bug_1144 acs_subsite_expose_bug_1144 (test acs-subsite) application_group::group_id_from_package_id application_group::group_id_from_package_id test_acs_subsite_expose_bug_1144->application_group::group_id_from_package_id test_subsite_api subsite_api (test acs-subsite) test_subsite_api->application_group::group_id_from_package_id test_test_inheritance_and_custom_permissions test_inheritance_and_custom_permissions (test acs-tcl) test_test_inheritance_and_custom_permissions->application_group::group_id_from_package_id acs_object_name acs_object_name (public) application_group::group_id_from_package_id->acs_object_name ad_conn ad_conn (public) application_group::group_id_from_package_id->ad_conn db_string db_string (public) application_group::group_id_from_package_id->db_string application_group::child_application_groups application_group::child_application_groups (public, deprecated) application_group::child_application_groups->application_group::group_id_from_package_id application_group::closest_ancestor_application_group_site_node application_group::closest_ancestor_application_group_site_node (public) application_group::closest_ancestor_application_group_site_node->application_group::group_id_from_package_id group::get_id_not_cached group::get_id_not_cached (private) group::get_id_not_cached->application_group::group_id_from_package_id install::xml::object_id::application-group install::xml::object_id::application-group (public) install::xml::object_id::application-group->application_group::group_id_from_package_id packages/acs-authentication/lib/search.tcl packages/acs-authentication/ lib/search.tcl packages/acs-authentication/lib/search.tcl->application_group::group_id_from_package_id

Testcases:
acs_subsite_expose_bug_1144, subsite_api, test_inheritance_and_custom_permissions
Source code:

    if { [ns_conn isconnected] && $package_id eq "" } {
        set package_id [ad_conn package_id]
    }

    if {$package_id eq ""} {
        error "application_group::group_id_from_package_id - no package_id specified."
    }

    set group_id [db_string application_group_from_package_id_query {
        select group_id
        from application_groups
        where package_id = :package_id
    } -default ""]

    if {!$no_complain_p && $group_id eq ""} {
        error "No group_id found for package $package_id ([acs_object_name $package_id])"
    }

    return $group_id
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-subsite/tcl/application-group-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/application-group-procs-oracle.xql

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