Commit abd42995 authored by Ghislain Loas's avatar Ghislain Loas

hotline #71669 add error message if resource don t endle rights

parent 5ac1b7e1
......@@ -115,6 +115,13 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
return implode($html);
}
if(!$permission_label = $this->_config->getPermissionLabel()) {
$html [] = $this->_tag('p', $this->_('Cette ressource ne prend pas en charge la gestion des droits'), ['class' => 'error']) ;
return implode($html);
}
$html [] = $this->_tag('p', $this->_('Nom de la permission à donner : "%s"', $permission_label));
$groups = new Storm_Collection(Class_UserGroup::findAll());
$this->_permitted_groups = array_filter(
$groups
......@@ -204,7 +211,6 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
. $this->_tag('ul',
$this->_tag('li', $this->_('Nom : %s', $group->getLibelle())));
Class_Users::clearCache();
$user = Class_Users::find($user->getId());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment