diff Lib/IMPL/Security.pm @ 230:6d8092d8ce1b

*reworked IMPL::Security *reworked IMPL::Web::Security *refactoring
author sergey
date Mon, 08 Oct 2012 03:37:37 +0400
parents 4d0e1962161c
children 7c517134c42f
line wrap: on
line diff
--- a/Lib/IMPL/Security.pm	Sat Sep 29 02:34:47 2012 +0400
+++ b/Lib/IMPL/Security.pm	Mon Oct 08 03:37:37 2012 +0400
@@ -1,5 +1,11 @@
 package IMPL::Security;
-require IMPL::Security::Context;
+use strict;
+use Carp qw(carp);
+
+##VERSION##
+
+require IMPL::Exception;
+require IMPL::Security::AbstractContext;
 require IMPL::Security::Rule::RoleCheck;
 
 our @rules = (
@@ -11,7 +17,7 @@
 sub AccessCheck {
     my ($self, $object, $desiredAccess, $context) = @_;
     
-    $context ||= IMPL::Security::Context->contextCurrent;
+    $context ||= IMPL::Security::AbstractContext->context;
     
     $_->() or return 0 foreach @{$self->Rules};