ad_administration_group_add

one of the documented procedures in this installation of the ACS
Usage:
ad_administration_group_add   db   pretty_name   module   { submodule "" }   { url "" }   { multi_role_p "f" }   { group_id "" }
What it does:
Creates an administration group. Returns: The group_id of the new group if it is created; The group_id of an old group if there was already a administration group for this module and submodule; 0 otherwise. Notice that unique short_name for group is genereted from pretty_name
Defined in: /web/philip/packages/acs-core/user-groups-procs.tcl

Source code:


    
    # PARAMETERS
    # db: database handle
    # pretty_name: pretty name of the group
    # module: module this is created for, ie. 'classifieds'
    # submodule: submodule this is created for, ie. 'equipment', 'jobs', 'wtr'
    # url: url of the module administration page
    # permission system: which type of permission system you would like to run (basic or advanced)
    # group_id (optional): group id of the new group. One will be generated if it is not specified
    
    set extra_values [ns_set create extra_values]
    ns_set put $extra_values module $module
    ns_set put $extra_values submodule $submodule
    ns_set put $extra_values url $url

    set group_id [ad_user_group_add $db "administration" $pretty_name "t" "f" "closed" $multi_role_p $extra_values $group_id]

    if { $group_id == 0} {
	# see if this group is defined already
	set selection [ns_db 0or1row $db "select group_id from administration_info where module='[DoubleApos $module]' and submodule='[DoubleApos $submodule]'"]
	if [empty_string_p $selection] {
	    return 0
	} else {
	    set_variables_after_query
	    return $group_id
	}
    }
    return $group_id


philg@mit.edu