CWIS Developer Documentation
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 
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 }
Definition: User.php:48
Set of privileges used to access resource information or other parts of the system.
MeetsRequirements(CWUser $User, $Resource=self::NO_RESOURCE)
Determine if a given user meets the requirements specified by this PrivilegeSet.
Compatibility layer allowing interfaces built against the privilege system from CWIS 3...
IsGreaterThan(PrivilegeSet $Set, $Resource=PrivilegeSet::NO_RESOURCE)
Check whether usser meets privilege requirements.
__construct(CWUser $User)
Class constructor.
CWIS-specific user class.
Definition: CWUser.php:13