Mercurial > pub > Impl
diff Lib/IMPL/Web/Security.pm @ 79:2d1c3f713280
ORM concept in development
author | wizard |
---|---|
date | Mon, 05 Apr 2010 00:20:34 +0400 |
parents | 2f31ecabe9ea |
children | 077357224bec |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Security.pm Fri Apr 02 20:19:17 2010 +0400 +++ b/Lib/IMPL/Web/Security.pm Mon Apr 05 00:20:34 2010 +0400 @@ -7,8 +7,7 @@ __PACKAGE__->PassThroughArgs; BEGIN { - public property sessionFactory => prop_get | owner_set; - public property userFactory => prop_get | owner_set; + public property source => prop_all; } sub CTOR { @@ -17,12 +16,19 @@ $this->dataSource or die new IMPL::InvalidArgumentException("The argument is required",'dataSource'); } -sub Session { - my ($this,%args) = @_; +sub RetrSession { + my ($this,$sid) = @_; + + return $this->source->RetrSession(id => $sid); } -sub User { +sub RetrSecData { + my ($this,$user,$secPackage) = @_; + $user = ref $user ? $user->name : $user; + + return + $this->source->RetrSecData(user => $user, package => $secPackage); } 1;