Permalink
Browse files

Auth is using page improperly, leave exception for now

  • Loading branch information...
1 parent 5e6080f commit 36e2d667a3062317077147a88b3a726e097f6efd @romaninsh romaninsh committed Sep 11, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/Page.php
View
@@ -33,8 +33,11 @@ class Page extends AbstractView {
protected $title='Page';
public $default_exception='Exception_ForUser';
function init(){
- if($this->owner!=$this->api){
- throw $this->exception('Do not add page manually. Page is automatically initialized by the Application class');
+ if($this->owner!=$this->api && !($this->owner instanceof BasicAuth)){
+ throw $this->exception('Do not add page manually. Page is automatically initialized by the Application class')
+ ->addMoreInfo('owner',$this->owner->name)
+ ->addMoreInfo('api',$this->api->name)
+ ;
}
if(isset($_GET['cut_page']) && !isset($_GET['cut_object']) && !isset($_GET['cut_region']))
$_GET['cut_object']=$this->short_name;

0 comments on commit 36e2d66

Please sign in to comment.