annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 79bf75223afe
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