mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
Merge pull request #734 from nlegoff/acl_service
[3.9] Add ACL as a service
This commit is contained in:
@@ -64,7 +64,7 @@ class databox_cgu
|
||||
$userValidation = true;
|
||||
|
||||
if (! $home) {
|
||||
if ( ! $app['authentication']->getUser()->ACL()->has_access_to_sbas($databox->get_sbas_id())) {
|
||||
if ( ! $app['acl']->get($app['authentication']->getUser())->has_access_to_sbas($databox->get_sbas_id())) {
|
||||
continue;
|
||||
}
|
||||
$userValidation = ($app['authentication']->getUser()->getPrefs('terms_of_use_' . $databox->get_sbas_id()) !== $update && trim($value) !== '');
|
||||
|
@@ -136,7 +136,7 @@ class databox_status
|
||||
return self::$_statuses;
|
||||
}
|
||||
|
||||
$sbas_ids = $app['authentication']->getUser()->ACL()->get_granted_sbas();
|
||||
$sbas_ids = $app['acl']->get($app['authentication']->getUser())->get_granted_sbas();
|
||||
|
||||
$statuses = array();
|
||||
|
||||
@@ -157,7 +157,7 @@ class databox_status
|
||||
{
|
||||
$statuses = array();
|
||||
|
||||
$sbas_ids = $app['authentication']->getUser()->ACL()->get_granted_sbas();
|
||||
$sbas_ids = $app['acl']->get($app['authentication']->getUser())->get_granted_sbas();
|
||||
|
||||
$see_all = array();
|
||||
|
||||
@@ -165,7 +165,7 @@ class databox_status
|
||||
$see_all[$databox->get_sbas_id()] = false;
|
||||
|
||||
foreach ($databox->get_collections() as $collection) {
|
||||
if ($app['authentication']->getUser()->ACL()->has_right_on_base($collection->get_base_id(), 'chgstatus')) {
|
||||
if ($app['acl']->get($app['authentication']->getUser())->has_right_on_base($collection->get_base_id(), 'chgstatus')) {
|
||||
$see_all[$databox->get_sbas_id()] = true;
|
||||
break;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class databox_status
|
||||
|
||||
$see_this = isset($see_all[$sbas_id]) ? $see_all[$sbas_id] : false;
|
||||
|
||||
if ($app['authentication']->getUser()->ACL()->has_right_on_sbas($sbas_id, 'bas_modify_struct')) {
|
||||
if ($app['acl']->get($app['authentication']->getUser())->has_right_on_sbas($sbas_id, 'bas_modify_struct')) {
|
||||
$see_this = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user