Changeset 94
- Timestamp:
- Aug 16, 2013, 10:20:57 PM (11 years ago)
- Location:
- trunk/www
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/View/Server.php
r93 r94 164 164 { 165 165 $Output = ''; 166 if($this->System->Modules[' User']->Data['Role'] >= USER_ROLE_USER)166 if($this->System->Modules['Permission']->Check('Server', 'Add')) 167 167 { 168 168 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server'); … … 185 185 } 186 186 } else $Output .= $this->System->SystemMessage('Nový server', 'Nelze vytvářet další servery'); 187 } else $Output .= USER_BAD_ROLE;187 } else $Output = $this->System->SystemMessage('Vytvoření serveru', 'Nemáte oprávnění'); 188 188 return($Output); 189 189 } … … 192 192 { 193 193 $Output = ''; 194 if($this->System->Modules[' User']->Data['Role'] >= USER_ROLE_USER)194 if($this->System->Modules['Permission']->Check('Server', 'Add')) 195 195 { 196 196 $DbResult = $this->Database->query('SELECT COUNT(*) FROM Server WHERE User='.$this->System->Modules['User']->Data['Id']); … … 219 219 //$Output .= $Form->ShowEditForm(); 220 220 } 221 } else $Output .= USER_BAD_ROLE;221 } else $Output = $this->System->SystemMessage('Vytvoření serveru', 'Nemáte oprávnění'); 222 222 return($Output); 223 223 } … … 227 227 $Output = ''; 228 228 $Server = new Server($this->System, $_POST['ServerId']); 229 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR)) 229 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or 230 ($this->System->Modules['Permission']->Check('Server', 'Modify'))) 230 231 { 231 232 $Form = new Form($this->System, $this->EditFormClass, array()); … … 249 250 $Output = ''; 250 251 $Server = new Server($this->System, $_GET['Id']); 251 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR)) 252 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or 253 ($this->System->Modules['Permission']->Check('Server', 'Modify'))) 252 254 { 253 255 $Form = new Form($this->System, $this->EditFormClass); … … 263 265 { 264 266 $Output = ''; 265 if($this->System->Modules[' User']->Data['Role'] >= USER_ROLE_USER)267 if($this->System->Modules['Permission']->Check('Server', 'OwnerControl')) 266 268 { 267 269 $Server = new Server($this->System, $_GET['Id']); 268 if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR)) 270 if(($this->System->Modules['User']->User['Id'] == $Server->Server['User']) or 271 ($this->System->Modules['Permission']->Check('Server', 'Control'))) 269 272 { 270 273 $Output .= $this->System->SystemMessage('Spuštění serveru', $Server->Start()); … … 272 275 $Output .= $TaskView->ItemList();; 273 276 } else $this->System->SystemMessage('Spuštění serveru', 'Nemáte oprávnění'); 274 } else $ Output .= USER_BAD_ROLE;277 } else $this->System->SystemMessage('Spuštění serveru', 'Nemáte oprávnění'); 275 278 return($Output); 276 279 } … … 279 282 { 280 283 $Output = ''; 281 if($this->System->Modules[' User']->Data['Role'] >= USER_ROLE_USER)284 if($this->System->Modules['Permission']->Check('Server', 'OwnerControl')) 282 285 { 283 286 $Server = new Server($this->System, $_GET['Id']); 284 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or ($this->System->Modules['User']->Data['Role'] >= USER_ROLE_ADMINISTRATOR)) 287 if(($this->System->Modules['User']->Data['Id'] == $Server->Server['User']) or 288 ($this->System->Modules['Permission']->Check('Server', 'Control'))) 285 289 { 286 290 $Output .= $this->System->SystemMessage('Zastavení serveru', $Server->Stop()); … … 288 292 $Output .= $TaskView->ItemList();; 289 293 } else $this->System->SystemMessage('Zastavení serveru', 'Nemáte oprávnění'); 290 } else $ Output .= USER_BAD_ROLE;294 } else $this->System->SystemMessage('Zastavení serveru', 'Nemáte oprávnění'); 291 295 return($Output); 292 296 } -
trunk/www/Application/View/Task.php
r93 r94 30 30 $Table->OnRow = array($this, 'ShowListOnRow'); 31 31 $Table->Definition['Table'] = '(SELECT Id, (COALESCE(UNIX_TIMESTAMP(TimeEnd), UNIX_TIMESTAMP(NOW())) - UNIX_TIMESTAMP(TimeStart)) AS Duration, TimeCreate, Title, State FROM Task WHERE User='. 32 $this->System->Modules['User']-> User['Id'].' ORDER BY Id DESC)';32 $this->System->Modules['User']->Data['Id'].' ORDER BY Id DESC)'; 33 33 $Table->Definition['Items']['Id'] = array('Type' => 'Hidden', 'Caption' => '', 'Default' => ''); 34 34 $Table->LoadValuesFromDatabase($this->Database); … … 40 40 } 41 41 $Output .= $Table->Show(); 42 $Output .= '<br /><div style="text-align: center;"><a href="? Action=TaskList">Obnovit pohled</a></dev>';42 $Output .= '<br /><div style="text-align: center;"><a href="?Module=Task&Action=ItemList">Obnovit pohled</a></dev>'; 43 43 return($Output); 44 44 } -
trunk/www/SQL/Updates/69.sql
r69 r94 10 10 ALTER TABLE `Realm` ADD `ClusterNode` INT NOT NULL ; 11 11 ALTER TABLE `Realm` ADD INDEX ( `ClusterNode` ) ; 12 UPDATE `Realm` SET ` Node` = 1;13 ALTER TABLE `Realm` ADD FOREIGN KEY ( ` Node` ) REFERENCES `ClusterNode` (`Id`);12 UPDATE `Realm` SET `ClusterNode` = 1; 13 ALTER TABLE `Realm` ADD FOREIGN KEY ( `ClusterNode` ) REFERENCES `ClusterNode` (`Id`); 14 14 15 15
Note:
See TracChangeset
for help on using the changeset viewer.