MTrackWeb/Wiki.php
authorAlan Knowles <alan@akbkhome.com>
Sun, 20 Mar 2011 05:19:28 +0000 (13:19 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sun, 20 Mar 2011 05:19:28 +0000 (13:19 +0800)
MTrackWeb/Wiki.php

index f9bf329..27c1062 100644 (file)
@@ -14,6 +14,7 @@ class MTrackWeb_Wiki extends MTrackWeb
     
     var $conflicted = 0;
     var $message = false;
+    var $hasHistory = false;
     
     function getAuth()
     {
@@ -42,16 +43,12 @@ class MTrackWeb_Wiki extends MTrackWeb
         $this->canEdit = $this->hasPerm('MTrack.wiki','E');
         // we might add more perms based on project later..
         
-        
+         if (!$this->canEdit && $this->edit) {
+            return HTML_FlexyFramework::run('Noperm');
+        }
         
         if ($this->doc) {
-            // permissions to modify wiki?
-            // by default anybody can view the wiki.. - at present..
             
-            if (!$this->canEdit && $this->edit) {
-                
-            }
-            MTrackACL::requireAnyRights("wiki:{$this->doc->pagename}", $this->edit ? 'modify' : 'read');
             $this->hasHistory = true;
         } else {
             MTrackACL::requireAnyRights("wiki:$this->pi",   $this->edit ? 'modify' : 'read');