# $Id: UserMgt.xotcl,v 1.6 2006/09/27 08:12:40 neumann Exp $ package provide xotcl::actiweb::userMgt 0.8 package require XOTcl namespace eval ::xotcl::actiweb::userMgt { namespace import ::xotcl::* Class UserMgt Class UserMgt::User -parameter {name password} UserMgt instproc addUser {name password} { [self class]::User [self]::$name -name $name -password $password } UserMgt set exportedInstprocs [list \ addUser \ listUsers \ deleteUser \ userMgtOptions\ ] UserMgt instproc init args { next my exportedProcs [concat [my exportedProcs] [[self class] set exportedInstprocs]] } UserMgt instproc listUsers {} { #showCall set users "" foreach u [my info children] { lappend users [namespace tail $u] } return $users } UserMgt instproc deleteUser {name} { if {[[self class]::User info instances [self]::$name] != ""} { [self]::$name destroy } } UserMgt instproc userMgtOptions {} { return [[self class] set exportedInstprocs] } Class UserMgtHtml -superclass HtmlRep UserMgtHtml instproc addUser args { set place [HtmlPlace getInstance] if {$args eq ""} { set action [url encodeItem "[my htmlCall] [my repObj] [self proc]"] set c {