<?php
include_once("Application.php");

class UserRestrictedApplication extends Application {
	protected function LoadPage($page, $action, $params) {		
		$user=Session::GetLoggedInUser();
		if ($user->HasAccess($page.'/'.$action))
			parent::LoadPage($page, $action, $params);
		else
			parent::LoadPage("member", "index", array("permission_error"=>true)/*Serialise URL, or something*/);
	}
	
	public function __construct($url) {
		parent::__construct($url);
	}
}
