annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 104:196bf443b5e1

DOM::Schema RC0 inflators support, validation and some other things, Minor and major fixes almost for everything. A 'Source' property of the ValidationErrors generated from a NodeSet or a NodeList is subject to change in the future.
author wizard
date Tue, 11 May 2010 02:42:59 +0400
parents 79bf75223afe
children 4d0e1962161c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
1 package IMPL::Security::Rule::RoleCheck;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
2
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
3 require IMPL::Security::Role;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
4
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
5 sub SatisfyAll {
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
6 my ($secPackage,$object,$desiredAccess,$context) = @_;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
7
94
79bf75223afe Fixed security related bugs
wizard
parents: 51
diff changeset
8 my $roleEffective = new IMPL::Security::Role ( _effective => $context->rolesAssigned );
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
9
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
10 return $roleEffective->Satisfy(ExtractRoles($object));
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
11 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
12
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
13 sub _ExtractRoles {
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
14 return ();
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
15 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
16