From bfa5ff7352d7aa78d87ca2328630805bdb9f0b50 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 21 Aug 2017 14:47:41 +0800 Subject: [PATCH] * finish task #3190. --- module/doc/model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/doc/model.php b/module/doc/model.php index 355e816859..14d4c0da74 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -610,6 +610,10 @@ class docModel extends model */ public function checkPriv($object, $type = 'lib') { + $acls = $this->app->user->rights['acls']; + if(!empty($object->product) and !empty($acls['products']) and !in_array($object->product, $acls['products'])) return false; + if(!empty($object->project) and !empty($acls['projects']) and !in_array($object->project, $acls['projects'])) return false; + if($object->acl == 'open') return true; $account = ',' . $this->app->user->account . ',';