mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Add AuthenticationServiceProvider
This commit is contained in:
@@ -107,17 +107,17 @@ class record_exportElement extends record_adapter
|
||||
'thumbnail' => true
|
||||
);
|
||||
|
||||
if ($this->app['phraseanet.user']->ACL()->has_right_on_base($this->get_base_id(), 'candwnldhd')) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->has_right_on_base($this->get_base_id(), 'candwnldhd')) {
|
||||
$go_dl['document'] = true;
|
||||
}
|
||||
if ($this->app['phraseanet.user']->ACL()->has_right_on_base($this->get_base_id(), 'candwnldpreview')) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->has_right_on_base($this->get_base_id(), 'candwnldpreview')) {
|
||||
$go_dl['preview'] = true;
|
||||
}
|
||||
if ($this->app['phraseanet.user']->ACL()->has_hd_grant($this)) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->has_hd_grant($this)) {
|
||||
$go_dl['document'] = true;
|
||||
$go_dl['preview'] = true;
|
||||
}
|
||||
if ($this->app['phraseanet.user']->ACL()->has_preview_grant($this)) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->has_preview_grant($this)) {
|
||||
$go_dl['preview'] = true;
|
||||
}
|
||||
|
||||
@@ -127,14 +127,14 @@ class record_exportElement extends record_adapter
|
||||
->who_have_right(array('order_master'))
|
||||
->execute()->get_results();
|
||||
|
||||
$go_cmd = (count($masters) > 0 && $this->app['phraseanet.user']->ACL()->has_right_on_base($this->base_id, 'cancmd'));
|
||||
$go_cmd = (count($masters) > 0 && $this->app['authentication']->getUser()->ACL()->has_right_on_base($this->base_id, 'cancmd'));
|
||||
|
||||
$orderable['document'] = false;
|
||||
$downloadable['document'] = false;
|
||||
|
||||
if (isset($sd['document']) && is_file($sd['document']->get_pathfile())) {
|
||||
if ($go_dl['document'] === true) {
|
||||
if ($this->app['phraseanet.user']->ACL()->is_restricted_download($this->base_id)) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->is_restricted_download($this->base_id)) {
|
||||
$this->remain_hd --;
|
||||
if ($this->remain_hd >= 0)
|
||||
$downloadable['document'] = array(
|
||||
@@ -182,7 +182,7 @@ class record_exportElement extends record_adapter
|
||||
if (isset($sd[$name]) && is_file($sd[$name]->get_pathfile())) {
|
||||
if ($class == 'document') {
|
||||
|
||||
if ($this->app['phraseanet.user']->ACL()->is_restricted_download($this->base_id)) {
|
||||
if ($this->app['authentication']->getUser()->ACL()->is_restricted_download($this->base_id)) {
|
||||
$this->remain_hd --;
|
||||
if ($this->remain_hd >= 0)
|
||||
$downloadable[$name] = array(
|
||||
|
Reference in New Issue
Block a user