Skip to content

Commit

Permalink
require valid user for Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
juzna committed Mar 7, 2012
1 parent c6b2c39 commit 7c90fd3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/presenters/GeneratorPresenter.php
Expand Up @@ -3,6 +3,8 @@
/**
* Downloads and generates API doc
*
* Requires logged-in user
*
* @author Jan Dolecek <juzna.cz@gmail.com>
*/
class GeneratorPresenter extends BasePresenter {
Expand All @@ -11,6 +13,13 @@ class GeneratorPresenter extends BasePresenter {

protected function startup() {
parent::startup();

// User must be authenticated
if (!$this->getUser()->loggedIn) {
$this->redirect('Sign:in');
}


$this->session->close(); // we ain't want session to block it all

// do not buffer!
Expand Down

0 comments on commit 7c90fd3

Please sign in to comment.