ILIAS  release_4-4 Revision
class.ilChatroomGetPermissionsTask.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
16 {
17 
18  private $gui;
19 
26  {
27  $this->gui = $gui;
28  }
29 
35  public function executeDefault($requestedMethod)
36  {
37  global $ilUser;
38 
39  switch($ilUser->getLogin())
40  {
41  case 'root':
42  $kick = $ban = true;
43  break;
44  default:
45  $kick = $ban = false;
46  }
47 
48  $permissions = array(
49  'kick' => $kick,
50  'ban' => $ban,
51  );
52 
53  echo json_encode($permissions);
54  exit;
55  }
56 
57 }
58 
59 ?>
executeDefault($requestedMethod)
Default execute method.
exit
Definition: login.php:54
__construct(ilChatroomObjectGUI $gui)
Constructor.
global $ilUser
Definition: imgupload.php:15
Class ilChatroomGetPermissionsTask.