annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 250:129e48bb5afb

DOM refactoring ObjectToDOM methods are virtual QueryToDOM uses inflators Fixed transform for the complex values in the ObjectToDOM QueryToDOM doesn't allow to use complex values (HASHes) as values for nodes (overpost problem)
author sergey
date Wed, 07 Nov 2012 04:17:53 +0400
parents 6d8092d8ce1b
children
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;
230
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
2 use strict;
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
3
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
4 require IMPL::Security::Role;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
5
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
6 sub SatisfyAll {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
7 my ($secPackage,$object,$desiredAccess,$context) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
8
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
9 my $roleEffective = new IMPL::Security::Role ( _effective => $context->rolesAssigned );
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
10
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
11 return $roleEffective->Satisfy(ExtractRoles($object));
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
12 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
13
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
14 sub _ExtractRoles {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
15 return ();
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
16 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
17
230
6d8092d8ce1b *reworked IMPL::Security
sergey
parents: 194
diff changeset
18 1;