Mercurial > pub > Impl
diff Lib/IMPL/Security/Context.pm @ 51:a1498298d3ee
Security in progress
author | wizard@linux-odin.local |
---|---|
date | Mon, 01 Mar 2010 17:25:36 +0300 |
parents | 16ada169ca75 |
children | f47f93534005 |
line wrap: on
line diff
--- a/Lib/IMPL/Security/Context.pm Sat Feb 27 16:28:45 2010 +0300 +++ b/Lib/IMPL/Security/Context.pm Mon Mar 01 17:25:36 2010 +0300 @@ -8,12 +8,13 @@ require IMPL::Security::Principal; -my $current = __PACKAGE__->nobody; +my $current; my $nobody; BEGIN { public property Principal => prop_get; public property AssignedRoles => prop_all; + public property AuthSession => prop_all; } sub Impersonate { @@ -33,10 +34,17 @@ } } -sub nobody { +sub contextNobody { my ($self) = @_; $nobody = $self->new(Principal => IMPL::Security::Principal->nobody, AssignedRoles => undef) unless $nobody; $nobody; } +sub contextCurrent { + my ($self) = @_; + + $current = __PACKAGE__->nobody unless $current; + $current; +} + 1;