mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Add getAuthenticator usage
Replace $app['authentication']->getUser() by $app->getAuthenticatedUser() replace twig app['authentication'].getUser() with corresponding method
This commit is contained in:
@@ -59,10 +59,10 @@ class databox_cgu
|
||||
$userValidation = true;
|
||||
|
||||
if (! $home) {
|
||||
if ( ! $app['acl']->get($app['authentication']->getUser())->has_access_to_sbas($databox->get_sbas_id())) {
|
||||
if ( ! $app['acl']->get($app->getAuthenticatedUser())->has_access_to_sbas($databox->get_sbas_id())) {
|
||||
continue;
|
||||
}
|
||||
$userValidation = ($app['settings']->getUserSetting($app['authentication']->getUser(), 'terms_of_use_' . $databox->get_sbas_id()) !== $update && trim($value) !== '');
|
||||
$userValidation = ($app['settings']->getUserSetting($app->getAuthenticatedUser(), 'terms_of_use_' . $databox->get_sbas_id()) !== $update && trim($value) !== '');
|
||||
}
|
||||
|
||||
if ($userValidation)
|
||||
|
@@ -22,10 +22,10 @@ class databox_status
|
||||
public static function getSearchStatus(Application $app)
|
||||
{
|
||||
$see_all = $structures = $stats = [];
|
||||
foreach ($app['acl']->get($app['authentication']->getUser())->get_granted_sbas() as $databox) {
|
||||
foreach ($app['acl']->get($app->getAuthenticatedUser())->get_granted_sbas() as $databox) {
|
||||
$see_all[$databox->get_sbas_id()] = false;
|
||||
foreach ($databox->get_collections() as $collection) {
|
||||
if ($app['acl']->get($app['authentication']->getUser())->has_right_on_base($collection->get_base_id(), 'chgstatus')) {
|
||||
if ($app['acl']->get($app->getAuthenticatedUser())->has_right_on_base($collection->get_base_id(), 'chgstatus')) {
|
||||
$see_all[$databox->get_sbas_id()] = true;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user