annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 209:a8db61d0ed33

IMPL::Class::Meta refactoring
author cin
date Mon, 28 May 2012 19:58:56 +0400
parents 4d0e1962161c
children 6d8092d8ce1b
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 {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
6 my ($secPackage,$object,$desiredAccess,$context) = @_;
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
7
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
8 my $roleEffective = new IMPL::Security::Role ( _effective => $context->rolesAssigned );
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
9
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
10 return $roleEffective->Satisfy(ExtractRoles($object));
51
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 {
194
4d0e1962161c Replaced tabs with spaces
cin
parents: 94
diff changeset
14 return ();
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
15 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
16