comparison Lib/IMPL/Security.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +0400
parents 6d8092d8ce1b
children 2270de2469ff
comparison
equal deleted inserted replaced
244:a02b110da931 245:7c517134c42f
3 use Carp qw(carp); 3 use Carp qw(carp);
4 4
5 ##VERSION## 5 ##VERSION##
6 6
7 require IMPL::Exception; 7 require IMPL::Exception;
8 require IMPL::Security::Principal;
8 require IMPL::Security::AbstractContext; 9 require IMPL::Security::AbstractContext;
9 require IMPL::Security::Rule::RoleCheck; 10 require IMPL::Security::Rule::RoleCheck;
10 11
11 our @rules = ( 12 our @rules = (
12 \&IMPL::Security::Rule::RoleCheck::SatisfyAll 13 \&IMPL::Security::Rule::RoleCheck::SatisfyAll
44 return \@rules; 45 return \@rules;
45 } 46 }
46 47
47 sub authority { 48 sub authority {
48 return $authority; 49 return $authority;
50 }
51
52 sub principal {
53 return
54 IMPL::Security::AbstractContext->current
55 && IMPL::Security::AbstractContext->current->principal
56 || IMPL::Security::Principal->nobody;
57 }
58
59 sub context {
60 IMPL::Security::AbstractContext->current;
49 } 61 }
50 62
51 1; 63 1;
52 64
53 __END__ 65 __END__