delete-2.tcl
Deletes a role if there are no relationship types that use it
- Location:
- /packages/acs-subsite/www/admin/rel-types/roles/delete-2.tcl
- Author:
- mbryzek@arsdigita.com
- Created:
- Mon Dec 11 11:30:53 2000
- CVS ID:
$Id: delete-2.tcl,v 1.4 2018/01/19 14:09:48 gustafn Exp $
Related Files
- packages/acs-subsite/www/admin/rel-types/roles/delete-2.tcl
- packages/acs-subsite/www/admin/rel-types/roles/delete-2-postgresql.xql
- packages/acs-subsite/www/admin/rel-types/roles/delete-2-oracle.xql
[ hide source ]
File Contents
# /packages/mbryzek-subsite/www/admin/rel-types/roles/delete-2.tcl ad_page_contract { Deletes a role if there are no relationship types that use it @author mbryzek@arsdigita.com @creation-date Mon Dec 11 11:30:53 2000 @cvs-id $Id: delete-2.tcl,v 1.4 2018/01/19 14:09:48 gustafn Exp $ } { role:notnull { operation "" } { return_url:localurl "" } } if {$operation eq "Yes, I really want to delete this role"} { db_transaction { if { [catch {db_exec_plsql drop_role {}} errmsg] } { if { [db_string role_used_p {}] } { ad_return_complaint 1 "<li> The role \"$role\" is still in use. You must remove all relationship types that use this role before you can remove this role." return } else { ad_return_error "Error deleting role" $errmsg return } } } } ad_returnredirect $return_url ad_script_abort # Local variables: # mode: tcl # tcl-indent-level: 4 # indent-tabs-mode: nil # End: