annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 59:0f3e369553bd

Rewritten property implementation (probably become slower but more flexible) Configuration infrastructure in progress (in the aspect of the lazy activation) Initial concept for the code generator
author wizard
date Tue, 09 Mar 2010 02:50:45 +0300
parents a1498298d3ee
children 79bf75223afe
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
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
8 my $roleEffective = new IMPL::Security::Role ( effective => $context->AssignedRoles );
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