annotate Lib/IMPL/Security.pm @ 372:e12c14177848

refactoring web resources model, implementing new simplified model
author cin
date Tue, 24 Dec 2013 20:01:55 +0400
parents d5c8b955bf8d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
1 package IMPL::Security;
230
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
2 use strict;
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
3 use Carp qw(carp);
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
4
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
5 ##VERSION##
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
6
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
7 require IMPL::Exception;
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents: 50
diff changeset
8 require IMPL::Security::Rule::RoleCheck;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents: 50
diff changeset
9
247
sergey
parents: 245
diff changeset
10 use IMPL::require {
sergey
parents: 245
diff changeset
11 Principal => 'IMPL::Security::Principal',
sergey
parents: 245
diff changeset
12 AbstractContext => 'IMPL::Security::AbstractContext',
sergey
parents: 245
diff changeset
13 Context => 'IMPL::Security::Context'
sergey
parents: 245
diff changeset
14 };
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents: 50
diff changeset
15
245
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
16 sub principal {
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
17 return
247
sergey
parents: 245
diff changeset
18 AbstractContext->current
sergey
parents: 245
diff changeset
19 && AbstractContext->current->principal
sergey
parents: 245
diff changeset
20 || Principal->nobody;
245
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
21 }
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
22
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
23 sub context {
248
814d755e5d12 Minor fixes
sergey
parents: 247
diff changeset
24 AbstractContext->current || Context->nobody;
245
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
25 }
7c517134c42f Added Unsupported media type Web exception
sergey
parents: 230
diff changeset
26
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 0
diff changeset
27 1;
50
wizard@linux-odin.local
parents: 49
diff changeset
28
371
d5c8b955bf8d refactoring
cin
parents: 248
diff changeset
29 __END__