Prechádzať zdrojové kódy

删除单个页面时,只有项目拥有者和页面创建者才能删除

star7th 10 rokov pred
rodič
commit
d5b5c741e5

+ 2 - 2
Application/Home/Controller/PageController.class.php

@@ -113,8 +113,8 @@ class PageController extends BaseController {
         $page = D("Page")->where(" page_id = '$page_id' ")->find();
 
         $login_user = $this->checkLogin();
-        if (!$this->checkItemPermn($login_user['uid'] , $page['item_id'])) {
-            $this->message("你无权限");
+        if (!$this->checkItemCreator($login_user['uid'] , $page['item_id']) && $login_user['uid'] != $page['author_uid']) {
+            $this->message("你无权限!此页面由".$page['author_username']."创建");
             return;
         }