Patch level : 12.00 1360
Files correlati : cg0.exe cg1.exe cg1300l.msk ba1400a.msk f2.dir f2.trr Commento: Aggiunto il flag OnlyOnePaIV nel paragrafo cg ddi ditta.ini per bloccare l'inserimento dei clienti/fornitori per gli utenti che non sono supervisori. Risistemato il controllo clienti/fornitori. Aggiuto caampo supervisore agli utenti.
This commit is contained in:
parent
05559dc539
commit
78d653577a
@ -7,3 +7,4 @@
|
||||
#define USR_AUTSTR "AUTSTR"
|
||||
#define USR_PERMISSION "PERMISSION"
|
||||
#define USR_CONNECTED "CONNECTED"
|
||||
#define USR_SUPERVISOR "SUPERVISOR"
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <progind.h>
|
||||
#include <user.h>
|
||||
#include <utility.h>
|
||||
#include <config.h>
|
||||
#include "../cg/cfban.h"
|
||||
@ -763,6 +764,18 @@ long daytime()
|
||||
return timeloc->tm_sec + timeloc->tm_min * 100L + timeloc->tm_hour * 10000L;
|
||||
}
|
||||
|
||||
// @func Ritorna se l'utente attuale è un supervisore
|
||||
bool supervisor()
|
||||
{
|
||||
if (admin())
|
||||
return true;
|
||||
|
||||
const TString & u = user();
|
||||
const TRectype & recuser = cache().get(LF_USER, u);
|
||||
|
||||
return recuser.get_bool(USR_SUPERVISOR);
|
||||
}
|
||||
|
||||
// DON'T cache this bool because hostname can be local or server
|
||||
static bool is_sirio_station(const char* hostname)
|
||||
{
|
||||
|
@ -97,6 +97,8 @@ const char* unesc(const char* str); // Trasforma i caratteri '\n' nella sequenza
|
||||
|
||||
istream& eatwhite (istream& i);
|
||||
|
||||
bool supervisor();
|
||||
|
||||
const TString& get_hostname();
|
||||
bool is_debug_station();
|
||||
bool is_power_station();
|
||||
|
Loading…
x
Reference in New Issue
Block a user