|
@@ -31,7 +31,7 @@ function load_page($p){
|
|
|
|
|
|
if(preg_match("/^\/private(.*)$/", $p) == 1){
|
|
if(preg_match("/^\/private(.*)$/", $p) == 1){
|
|
// Page is user page
|
|
// Page is user page
|
|
- if(Auth::hasPermission('user')){
|
|
|
|
|
|
+ if(Auth::hasPermission(User::ROLE_USER)){
|
|
switch($p){
|
|
switch($p){
|
|
case "/private/":
|
|
case "/private/":
|
|
return "include/php/pages/private/start.php";
|
|
return "include/php/pages/private/start.php";
|
|
@@ -48,7 +48,7 @@ function load_page($p){
|
|
|
|
|
|
else if(preg_match("/^\/admin(.*)$/", $p) == 1){
|
|
else if(preg_match("/^\/admin(.*)$/", $p) == 1){
|
|
// Page is admin page
|
|
// Page is admin page
|
|
- if(Auth::hasPermission('admin')){
|
|
|
|
|
|
+ if(Auth::hasPermission(User::ROLE_ADMIN)){
|
|
switch($p){
|
|
switch($p){
|
|
case "/admin/":
|
|
case "/admin/":
|
|
return "include/php/pages/admin/start.php";
|
|
return "include/php/pages/admin/start.php";
|