CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

PrivilegeSetCompatibilityShim.php
Go to the documentation of this file.
1 <?PHP
2 #
3 # FILE: PrivilegeSetCompatibilityShim.php
4 #
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2014-2017 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
8 #
9
15 class PrivilegeSetCompatibilityShim
16 {
21 public function __construct(CWUser $User)
22 {
23 $this->User = $User;
24 }
25
32 public function IsGreaterThan(PrivilegeSet $Set,
33 $Resource = PrivilegeSet::NO_RESOURCE)
34 {
35 return $Set->MeetsRequirements($this->User, $Resource);
36 }
37
38 # ---- PRIVATE INTERFACE -------------------------------------------------
39
40 private $User;
41 }
PrivilegeSet\NO_RESOURCE
const NO_RESOURCE
Definition: PrivilegeSet.php:635
User
Definition: User.php:48
PrivilegeSet
Set of privileges used to access resource information or other parts of the system.
Definition: PrivilegeSet.php:16
PrivilegeSet\MeetsRequirements
MeetsRequirements(CWUser $User, $Resource=self::NO_RESOURCE)
Determine if a given user meets the requirements specified by this PrivilegeSet.
Definition: PrivilegeSet.php:96
PHP
PHP
Definition: RSSClient--Test.php:12
PrivilegeSetCompatibilityShim
Compatibility layer allowing interfaces built against the privilege system from CWIS 3...
Definition: PrivilegeSetCompatibilityShim.php:15
PrivilegeSetCompatibilityShim\IsGreaterThan
IsGreaterThan(PrivilegeSet $Set, $Resource=PrivilegeSet::NO_RESOURCE)
Check whether usser meets privilege requirements.
Definition: PrivilegeSetCompatibilityShim.php:32
PrivilegeSetCompatibilityShim\__construct
__construct(CWUser $User)
Class constructor.
Definition: PrivilegeSetCompatibilityShim.php:21
CWUser
CWIS-specific user class.
Definition: CWUser.php:13