annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 134:44977efed303

Significant performance optimizations Fixed recursion problems due converting objects to JSON Added cache support for the templates Added discovery feature for the web methods
author wizard
date Mon, 21 Jun 2010 02:39:53 +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