Fix perms problems in xorgAuth
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 19 Sep 2009 22:56:08 +0000 (00:56 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 19 Sep 2009 22:56:08 +0000 (00:56 +0200)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
class.xorg.auth.php
page.auth.php

index d593724..675e5d9 100644 (file)
@@ -224,10 +224,10 @@ class xorgAuth extends dcAuth {
 
   public function userID() {
     $this->buildFromSession();
-    $isadmin = preg_match('@/admin/[^/]+\.php$@i', $_SERVER['SCRIPT_FILENAME']);
-    if (!$isadmin) {
-      return null;
-    }
+//    $isadmin = preg_match('@/admin/[^/]+\.php$@i', $_SERVER['SCRIPT_FILENAME']);
+//    if (!$isadmin) {
+//      return null;
+//    }
     return parent::userID();
   }
 
@@ -240,7 +240,7 @@ class xorgAuth extends dcAuth {
     $this->buildFromSession();
     if ($n == 'xorg_group_member') {
       global $core;
-      if ($core->blog->settings('xorg_blog_owner') != $_SESSION['xorg-group']) {
+      if ($core->blog->settings->get('xorg_blog_owner') != $_SESSION['xorg-group']) {
         return false;
       }
       $perm = $this->xorg_infos['grpauth'];
index 6a197f0..e9c912f 100644 (file)
@@ -9,7 +9,7 @@ class xorgAuthentifier extends dcUrlHandlers {
       break;
      case 'Xorg':
       if ($core->auth->callXorg($_GET['path'])) {
-        header('Location: http://murphy.m4x.org' . $_GET['path']);
+        header('Location: ' . $core->blog->url . $_GET['path']);
         exit;
       }
       break;