show hosts have option to schedule, (not implemented yet, just context menu)
This commit is contained in:
parent
4e2c791bd3
commit
e8965fd30a
6 changed files with 56 additions and 27 deletions
|
@ -2,13 +2,11 @@
|
|||
|
||||
class Show {
|
||||
|
||||
private $_userRole;
|
||||
private $_userId;
|
||||
private $_user;
|
||||
|
||||
public function __construct($userId, $userType='G')
|
||||
public function __construct($user=NULL)
|
||||
{
|
||||
$this->_userRole = $userType;
|
||||
$this->_userId = $userId;
|
||||
$this->_user = $user;
|
||||
}
|
||||
|
||||
//end dates are non inclusive.
|
||||
|
@ -323,10 +321,14 @@ class Show {
|
|||
$event[$key] = $value;
|
||||
}
|
||||
|
||||
if($this->_userRole === "A") {
|
||||
if($this->_user->isAdmin() === "A") {
|
||||
$event["editable"] = true;
|
||||
}
|
||||
|
||||
if($this->_user->isHost($show["show_id"])) {
|
||||
$event["isHost"] = true;
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue