auth::get_register_authority (public)

 auth::get_register_authority

Defined in packages/acs-authentication/tcl/authentication-procs.tcl

Get the ID of the authority in which accounts get created. Is based on the RegisterAuthority parameter but will default to the local authority if that parameter has an invalid value.

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth__get_register_authority auth__get_register_authority (test acs-authentication) auth::get_register_authority auth::get_register_authority test_auth__get_register_authority->auth::get_register_authority auth::authority::get auth::authority::get (public) auth::get_register_authority->auth::authority::get auth::authority::get_id auth::authority::get_id (public) auth::get_register_authority->auth::authority::get_id auth::authority::get_short_names auth::authority::get_short_names (public) auth::get_register_authority->auth::authority::get_short_names auth::authority::local auth::authority::local (public) auth::get_register_authority->auth::authority::local parameter::get_from_package_key parameter::get_from_package_key (public) auth::get_register_authority->parameter::get_from_package_key auth::create_user auth::create_user (public) auth::create_user->auth::get_register_authority auth::get_registration_elements auth::get_registration_elements (public) auth::get_registration_elements->auth::get_register_authority packages/acs-admin/www/auth/index.tcl packages/acs-admin/ www/auth/index.tcl packages/acs-admin/www/auth/index.tcl->auth::get_register_authority packages/acs-subsite/lib/login.tcl packages/acs-subsite/ lib/login.tcl packages/acs-subsite/lib/login.tcl->auth::get_register_authority xo::ProtocolHandler instproc set_user_id xo::ProtocolHandler instproc set_user_id (public) xo::ProtocolHandler instproc set_user_id->auth::get_register_authority

Testcases:
auth__get_register_authority
Source code:
    set parameter_value [parameter::get_from_package_key -parameter RegisterAuthority -package_key "acs-authentication"]

    # Catch the case where somebody has set the parameter to some non-existent authority
    if {$parameter_value in [auth::authority::get_short_names]} {
        # The authority exists
        set authority_id [auth::authority::get_id -short_name $parameter_value]

        # Check that the authority has a register implementation
        auth::authority::get -authority_id $authority_id -array authority

        if { $authority(register_impl_id) eq "" } {
            ns_log Error "auth::get_register_authority: parameter value for RegisterAuthority is an authority without registration driver, defaulting to local authority"
            set authority_id [auth::authority::local]
        }
    } else {
        # The authority doesn't exist - use the local authority
        ns_log Error "auth::get_register_authority: parameter RegisterAuthority has the invalid value $parameter_value. Defaulting to local authority"
        set authority_id [auth::authority::local]
    }

    return $authority_id
Generic XQL file:
packages/acs-authentication/tcl/authentication-procs.xql

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

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

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