Jump to content

Empecher la creation de catégorie.


Recommended Posts

  • 1 year later...

Même problématique. Avez-vous trouvé une solution depuis ? Merci.

 

Dans le fichier => admin/tabs/AdminCategories.php,

modifier le code suivant :

class AdminCategories extends AdminTab
{
protected $maxImageSize = 300000;
/** @var object Category() instance for navigation*/
private $_category;
public function __construct()
{
 global $cookie;

 $this->table = 'category';
  $this->className = 'Category';
  $this->lang = true;
 $this->view = true;
  $this->edit = true;
  $this->delete = true;

par celui ci :

class AdminCategories extends AdminTab
{
protected $maxImageSize = 300000;
/** @var object Category() instance for navigation*/
private $_category;
public function __construct()
{
 global $cookie;

 $this->table = 'category';
  $this->className = 'Category';
  $this->lang = true;
 $this->view = true;
/** JMB modif 1 => Categories modifiables ou effaçables uniquement si l'utilisateur connecté appartient au groupe administrateur */
 if( $cookie->profile == 1)
 {
  $this->edit = true;
  $this->delete = true;
 }
/** Fin modif 1 JMB */

C'est une simple condition, vous pouvez changer le groupe ("profil") par l'id d'un utilisateur spécifique.

Il faut un peu taper dans le code mais, malheureusement, cela me semble être la seule solution à l'heure actuelle.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...