diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-11 13:58:38 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-11 13:58:38 +0000 |
commit | a521d9177f5e299d2ff25cc288e59e4bf1398a1b (patch) | |
tree | 1a0664cb4aa01d698d1dcd1b6fba9cfd3ee1e9b8 /core | |
parent | 30239ed302c571efb0cd9c86625be30fce5b4bd9 (diff) |
Force a login if everybody does not have access to the root
item. ticket #118.
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/albums.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/controllers/albums.php b/core/controllers/albums.php index 270b2184..9811ba13 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -23,7 +23,15 @@ class Albums_Controller extends Items_Controller { * @see REST_Controller::_show($resource) */ public function _show($album) { - access::required("view", $album); + try { + access::required("view", $album); + } catch (Exception $e) { + if ($album->id != 1) { + throw $e; + } else { + url::redirect("login/page"); + } + } $page_size = module::get_var("core", "page_size", 9); $show = $this->input->get("show"); |