PHRAS-508_acl-cache

- wip
This commit is contained in:
Jean-Yves Gaulier
2016-10-20 19:36:26 +02:00
parent f4f85dc3b7
commit 6a2285f66d
72 changed files with 571 additions and 599 deletions

View File

@@ -99,10 +99,10 @@ class record_exportElement extends record_adapter
'thumbnail' => true
];
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'candwnldhd')) {
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), \ACL::CANDWNLDHD)) {
$go_dl['document'] = true;
}
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'candwnldpreview')) {
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), \ACL::CANDWNLDPREVIEW)) {
$go_dl['preview'] = true;
}
if ($this->app->getAclForUser($this->app->getAuthenticatedUser())->has_hd_grant($this)) {
@@ -116,7 +116,7 @@ class record_exportElement extends record_adapter
$query = $this->app['phraseanet.user-query'];
$masters = $query->on_base_ids([$this->getBaseId()])
->who_have_right(['order_master'])
->who_have_right([\ACL::ORDER_MASTER])
->execute()->get_results();
$go_cmd = (count($masters) > 0 && $this->app->getAclForUser($this->app->getAuthenticatedUser())->has_right_on_base($this->getBaseId(), 'cancmd'));