49
|
1 package IMPL::Security;
|
230
|
2 use strict;
|
|
3 use Carp qw(carp);
|
|
4
|
|
5 ##VERSION##
|
|
6
|
|
7 require IMPL::Exception;
|
51
|
8 require IMPL::Security::Rule::RoleCheck;
|
|
9
|
247
|
10 use IMPL::require {
|
|
11 Principal => 'IMPL::Security::Principal',
|
|
12 AbstractContext => 'IMPL::Security::AbstractContext',
|
|
13 Context => 'IMPL::Security::Context'
|
|
14 };
|
51
|
15
|
245
|
16 sub principal {
|
|
17 return
|
247
|
18 AbstractContext->current
|
|
19 && AbstractContext->current->principal
|
|
20 || Principal->nobody;
|
245
|
21 }
|
|
22
|
|
23 sub context {
|
248
|
24 AbstractContext->current || Context->nobody;
|
245
|
25 }
|
|
26
|
49
|
27 1;
|
50
|
28
|
371
|
29 __END__ |