annotate Lib/IMPL/Security/Rule/RoleCheck.pm @ 245:7c517134c42f

Added Unsupported media type Web exception corrected resourceLocation setting in the resource Implemented localizable resources for text messages fixed TT view scopings, INIT block in controls now sets globals correctly.
author sergey
date Mon, 29 Oct 2012 03:15:22 +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;