annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 394:2c14f66efa08

minor changes
author cin
date Tue, 18 Feb 2014 18:17:20 +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;