Fix: (Bug 13) CashDesk: Everyone can access to the Point of sales

This commit is contained in:
Juanjo Menent 2011-10-10 17:22:42 +02:00
parent 7fe76249e0
commit 64df40d324
5 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -85,6 +86,15 @@ class modCashDesk extends DolibarrModules
// Permissions // Permissions
$this->rights = array(); $this->rights = array();
$this->rights_class = 'cashdesk';
$r=0;
$r++;
$this->rights[$r][0] = 50001;
$this->rights[$r][1] = 'Use cashdesk';
$this->rights[$r][2] = 'a';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'use';
// Main menu entries // Main menu entries
$this->menus = array(); // List of menus to add $this->menus = array(); // List of menus to add
@ -100,7 +110,7 @@ class modCashDesk extends DolibarrModules
'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'langs'=>'cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100, 'position'=>100,
'enabled'=>'$conf->cashdesk->enabled', 'enabled'=>'$conf->cashdesk->enabled',
'perms'=>1, // Use 'perms'=>'1' if you want your menu with no permission rules 'perms'=>'$user->rights->cashdesk->use', // Use 'perms'=>'1' if you want your menu with no permission rules
'target'=>'pointofsale', 'target'=>'pointofsale',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both

View File

@ -635,6 +635,7 @@ Permission2515=Configuració carpetes de documents
Permission8555=Ús del mòdul Permission8555=Ús del mòdul
Permission8556=Establir llocs ecommerce Permission8556=Establir llocs ecommerce
Permission8557=Importar dades Permission8557=Importar dades
Permission50001=Utilitzar TPV
Permission50201=Consultar les transaccions Permission50201=Consultar les transaccions
Permission50202=Importar les transaccions Permission50202=Importar les transaccions
DictionnaryCompanyType=Tipus d'empresa DictionnaryCompanyType=Tipus d'empresa

View File

@ -627,6 +627,7 @@ Permission2501=Read/Download documents
Permission2502=Download documents Permission2502=Download documents
Permission2503=Submit or delete documents Permission2503=Submit or delete documents
Permission2515=Setup documents directories Permission2515=Setup documents directories
Permission50001=Use Point of sales
Permission50201= Read transactions Permission50201= Read transactions
Permission50202= Import transactions Permission50202= Import transactions
DictionnaryCompanyType=Company types DictionnaryCompanyType=Company types

View File

@ -635,6 +635,7 @@ Permission2515=Configuración directorios de documentos
Permission8555=Uso del módulo Permission8555=Uso del módulo
Permission8556=Establecer sitios e-commerce Permission8556=Establecer sitios e-commerce
Permission8557=Importar datos Permission8557=Importar datos
Permission50001=Usar TPV
Permission50201=Consultar las transacciones Permission50201=Consultar las transacciones
Permission50202=Importar las transacciones Permission50202=Importar las transacciones
DictionnaryCompanyType=Tipos de empresa DictionnaryCompanyType=Tipos de empresa

View File

@ -636,6 +636,7 @@ Permission2515= Administrer les rubriques de documents
Permission8555= Utilisation du module Permission8555= Utilisation du module
Permission8556= Définir les sites ecommerce Permission8556= Définir les sites ecommerce
Permission8557= Importer les données Permission8557= Importer les données
Permission50001=Utiliser Point de vente
Permission50201= Consulter les transactions Permission50201= Consulter les transactions
Permission50202= Importer les transactions Permission50202= Importer les transactions
DictionnaryCompanyType= Types de sociétés DictionnaryCompanyType= Types de sociétés