application_group::contains_party_p (public)
application_group::contains_party_p [ -package_id package_id ] \ [ -party_id party_id ] [ -include_self ]
Defined in packages/acs-subsite/tcl/application-group-procs.tcl
Determines whether the party in question (identified by party_id) is contained by the application group identified by package_id. If package_id is not specified, and we have a connection, then the proc will grab the package_id of the current package (i.e., [ad_conn package_id]).
- Switches:
- -package_id (optional)
- -party_id (optional)
- -include_self (optional, boolean)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- subsite_api
Source code: if {$package_id eq "" && [ns_conn isconnected]} { set package_id [ad_conn package_id] } if {$package_id eq ""} { error "application_group::contains_party_p - package_id not specified" } # Check if the party is a member of the application group, OR # the party *is* the application group. This proc considers the # application group to contain itself. if {$include_self_p} { set found_p [db_string app_group_contains_party_p { select case when exists ( select 1 from application_group_element_map where package_id = :package_id and element_id = :party_id union all select 1 from application_groups where package_id = :package_id and group_id = :party_id ) then 1 else 0 end from dual }] } else { set found_p [db_string app_group_contains_party_p { select case when exists ( select 1 from application_group_element_map where package_id = :package_id and element_id = :party_id ) then 1 else 0 end from dual }] } return $found_pXQL 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