# Checks for libraries.
PKG_CHECK_MODULES([MESSI], [gtk+-3.0 >= 3.0.0
- libgtkform >= 0.5.0
- libgtkformui >= 0.5.0
- libaute >= 0.2.0
- libautoz >= 0.0.5
- libsolipa >= 0.5.0
- liborganigramma >= 0.0.1
- libzakaudit >= 0.5.0
- libreptool >= 0.5.0])
+ libzakconfi
+ libgtkform >= 0.5.0
+ libgtkformui >= 0.5.0
+ libzakauthe >= 0.5.0
+ libzakautho >= 0.0.5
+ libsolipa >= 0.5.0
+ liborganigramma >= 0.0.1
+ libzakaudit >= 0.5.0
+ libreptool >= 0.5.0])
AC_SUBST(MESSI_CFLAGS)
AC_SUBST(MESSI_LIBS)
[DB_TERRITORIO]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=territorio
-[AUTOZ_TERRITORIO]
+[ZAKAUTHO_TERRITORIO]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=autoz
[DB_ORGANIGRAMMA]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=organigramma
-[AUTOZ_ORGANIGRAMMA]
+[ZAKAUTHO_ORGANIGRAMMA]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=autoz
-[AUTE]
-plugin=/usr/local/lib/libaute/plugins/libaute-db
+[libzakauthe]
+plugin=zakauthedb
+
+[libzakauthe/libzakauthedb/db]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=autedb
-[AUTOZ]
+[ZAKAUTHO]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=autoz
-[AUDIT]
+[ZAKAUDIT]
cnc_string=PostgreSQL://postgres:postgres@HOST=localhost;PORT=5432;DB_NAME=audit
[DB]
--- /dev/null
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = @SHELL@
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+libdir = @libdir@
+localedir = $(libdir)/locale
+gnulocaledir = $(datadir)/locale
+gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+subdir = po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = mkdir -p
+
+CC = @CC@
+GENCAT = @GENCAT@
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+
+INCLUDES = -I.. -I$(top_srcdir)/intl
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+SOURCES =
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
+$(POFILES) $(GMOFILES) $(SOURCES)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
+
+.SUFFIXES:
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ $(AM_V_GEN) file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && $(GENCAT) $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) \
+ --msgid-bugs-address='http://bugzilla.gnome.org/enter_bug.cgi?product=glib&keywords=I18N+L10N&component=general' \
+ --add-comments --keyword=_ --keyword=N_ \
+ --keyword=C_:1c,2 \
+ --keyword=NC_:1c,2 \
+ --keyword=g_dcgettext:2 \
+ --keyword=g_dngettext:2,3 \
+ --keyword=g_dpgettext2:2c,3 \
+ --flag=N_:1:pass-c-format \
+ --flag=C_:2:pass-c-format \
+ --flag=NC_:2:pass-c-format \
+ --flag=g_dngettext:2:pass-c-format \
+ --flag=g_strdup_printf:1:c-format \
+ --flag=g_string_printf:2:c-format \
+ --flag=g_string_append_printf:2:c-format \
+ --flag=g_error_new:3:c-format \
+ --flag=g_set_error:4:c-format \
+ --flag=g_markup_printf_escaped:1:c-format \
+ --flag=g_log:3:c-format \
+ --flag=g_print:1:c-format \
+ --flag=g_printerr:1:c-format \
+ --flag=g_printf:1:c-format \
+ --flag=g_fprintf:2:c-format \
+ --flag=g_sprintf:2:c-format \
+ --flag=g_snprintf:3:c-format \
+ --flag=g_scanner_error:2:c-format \
+ --flag=g_scanner_warn:2:c-format \
+ $(POTFILES) \
+ && test ! -f $(GETTEXT_PACKAGE).po \
+ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
+ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ $(MKINSTALLDIRS) $$dir; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ done
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ fi
+
+check: all
+
+dvi info tags TAGS ID:
+
+mostlyclean:
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(GMOFILES)
+
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ for file in $$dists; do \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ cd $(srcdir); \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ echo "$$lang:"; \
+ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$cat failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+# POTFILES is created from POTFILES.in by stripping comments, empty lines
+# and Intltool tags (enclosed in square brackets), and appending a full
+# relative path to them
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' \
+ -e "s/^\[.*\] +//" \
+ -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && $(SHELL) ./config.status $(subdir)/$@.in
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
#include <gdk/gdkkeysyms.h>
-#include <libautoz/autoz.h>
+#include <libzakautho/autoz.h>
#include <libsolipa/libsolipa.h>
#include <liborganigramma/ufficio.h>
*atti_new (Commons *commons, gboolean selezione)
{
GError *error;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
Atti *a = ATTI (g_object_new (atti_get_type (), NULL));
atti_carica (a);
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, "messi_rw");
- if (!autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, "messi_rw");
+ if (!zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
{
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button4")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button6")), FALSE);
GtkTreeIter iter;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
GHashTable *ht_ufficio;
GValue *gv_ufficio;
/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <gdk/gdkkeysyms.h>
-#include <libautoz/autoz.h>
+#include <libzakautho/autoz.h>
#include <libgtkform/form.h>
#include <libgtkform/fielddatetime.h>
#include <libgtkformui/gtkformdecoder.h>
*atto_new (Commons *commons, gint id)
{
GError *error;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
Atto *a = ATTO (g_object_new (atto_get_type (), NULL));
atto_carica (a);
}
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, "messi_rw");
- if (!autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, "messi_rw");
+ if (!zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
{
gtk_form_set_sensitive_by_name (priv->form, FALSE,
"button39",
Atto *a = (Atto *)user_data;
AttoPrivate *priv = ATTO_GET_PRIVATE (a);
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
ret = TRUE;
/* per adesso controllo solo gli uffici */
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
- ret = autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
+ ret = zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
return ret;
}
#include <gtk/gtk.h>
#include <libgdaex/libgdaex.h>
-#include <libautoz/autoz.h>
-#include <libautoz/role_interface.h>
+#include <libzakautho/autoz.h>
+#include <libzakautho/role_interface.h>
#include <libsolipa/libsolipa.h>
#include <libterritorio/commons.h>
const gchar *guifile;
const gchar *utente;
- Autoz *autoz;
- AutozIRole *role_utente;
+ ZakAutho *autoz;
+ ZakAuthoIRole *role_utente;
Solipa *solipa;
#include <sql-parser/gda-sql-parser.h>
-#include <libaute.h>
-#include <libautoz/autoz.h>
+#include <libzakconfi/libzakconfi.h>
+#include <libzakauthe/libzakauthe.h>
+#include <libzakautho/autoz.h>
#include <libzakaudit.h>
#include <libterritorio/commons.h>
#include <libterritorio/comuni.h>
static ZakAudit *audit;
-static GKeyFile *config;
-
static GtkWidget *w;
static GtkWidget *vbx_body;
static GtkWidget *vbx_body_child;
{
GError *error;
+ ZakConfi *confi;
+
GdaConnection *gdacon;
- Aute *aute;
+ ZakAuthe *aute;
gchar **aute_params;
gsize n_aute_params;
GSList *sl_aute_params;
gint i;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
#ifdef G_OS_WIN32
if (g_getenv ("TZ") == NULL)
g_error ("Occorre passare a riga di comando il file di configurazione.");
}
- error = NULL;
- config = g_key_file_new ();
- if (!g_key_file_load_from_file (config, argv[1], G_KEY_FILE_NONE, &error))
+ confi = zak_confi_new (argv[1]);
+ if (confi == NULL)
{
- g_error ("Impossibile caricare il file di configurazione specificato: %s.", argv[1]);
+ g_error ("Impossibile leggere la configurazione specificata: %s.", argv[1]);
}
/* leggo i parametri per l'autenticazione */
- error = NULL;
- aute_params = g_key_file_get_keys (config, "AUTE", &n_aute_params, &error);
- if (aute_params == NULL)
- {
- g_error ("Impossibile leggere la configurazione per il sistema di autenticazione.");
- }
-
sl_aute_params = NULL;
- for (i = 0; i < n_aute_params; i++)
- {
- error = NULL;
- sl_aute_params = g_slist_append (sl_aute_params, g_key_file_get_string (config, "AUTE", aute_params[i], &error));
- }
-
- g_strfreev (aute_params);
+ sl_aute_params = g_slist_append (sl_aute_params, "{libzakconfi}");
+ sl_aute_params = g_slist_append (sl_aute_params, confi);
/* autenticazione */
- aute = aute_new ();
- aute_set_config (aute, sl_aute_params);
+ aute = zak_authe_new ();
+ zak_authe_set_config (aute, sl_aute_params);
+
+ g_strfreev (aute_params);
while (TRUE)
{
- utente = aute_autentica (aute);
+ utente = zak_authe_authe (aute);
if (utente == NULL)
{
commons->territorio_commons = g_new0 (TerritorioCommons, 1);
commons->organigramma_commons = g_new0 (OrganigrammaCommons, 1);
- commons->autozgui_commons = g_new0 (AutozGuiCommons, 1);
commons->utente = utente;
commons->territorio_commons->utente = utente;
commons->territorio_commons->formdir = g_build_filename ("/mingw", "share", "territorio", "form", NULL);
commons->organigramma_commons->guidir = g_build_filename ("/mingw", "share", "organigramma", "gui", NULL);
commons->organigramma_commons->formdir = g_build_filename ("/mingw", "share", "organigramma", "form", NULL);
- commons->autozgui_commons->guidir = g_build_filename ("/mingw", "share", "autoz-gui", "gui", NULL);
}
else
{
commons->territorio_commons->formdir = g_build_filename (moddir, "share", "territorio", "form", NULL);
commons->organigramma_commons->guidir = g_build_filename (moddir, "share", "organigramma", "gui", NULL);
commons->organigramma_commons->formdir = g_build_filename (moddir, "share", "organigramma", "form", NULL);
- commons->autozgui_commons->guidir = g_build_filename (moddir, "share", "autoz-gui", "gui", NULL);
}
#else
commons->territorio_commons->formdir = g_build_filename ("/usr", "local", "share", "territorio", "form", NULL);
commons->organigramma_commons->guidir = g_build_filename ("/usr", "local", "share", "organigramma", "gui", NULL);
commons->organigramma_commons->formdir = g_build_filename ("/usr", "local", "share", "organigramma", "form", NULL);
- commons->autozgui_commons->guidir = g_build_filename ("/usr", "local", "share", "autoz-gui", "gui", NULL);
#endif
commons->guifile = g_build_filename (commons->guidir, "messi.gui", NULL);
commons->territorio_commons->guifile = g_build_filename (commons->territorio_commons->guidir, "territorio.gui", NULL);
commons->organigramma_commons->guifile = g_build_filename (commons->organigramma_commons->guidir, "organigramma.gui", NULL);
- commons->autozgui_commons->guifile = g_build_filename (commons->autozgui_commons->guidir, "autoz-gui.ui", NULL);
/* leggo la stringa di connessione al db */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "DB", "cnc_string", &error);
+ cnc_string = zak_confi_path_get_value (confi, "DB/cnc_string");
if (cnc_string == NULL)
{
- if (error != NULL)
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione: %s", error->message);
- }
- else
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
- }
+ g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
}
commons->gdaex = gdaex_new_from_string (cnc_string);
}
/* leggo la stringa di connessione al db nativa di postgres */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "DB", "pg_cnc_string", &error);
+ cnc_string = zak_confi_path_get_value (confi, "DB/pg_cnc_string");
if (cnc_string == NULL)
{
- if (error != NULL)
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione: %s", error->message);
- }
- else
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
- }
+ g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
}
commons->pgcon = PQconnectdb (cnc_string);
g_error ("Errore nella connessione al database: %s", cnc_string);
}
- /* leggo i parametri per libautoz */
+ /* leggo i parametri per libzakautho */
error = NULL;
- cnc_string = g_key_file_get_value (config, "AUTOZ", "cnc_string", &error);
+ cnc_string = zak_confi_path_get_value (confi, "ZAKAUTHO/cnc_string");
if (cnc_string == NULL)
{
- g_warning ("Impossibile leggere la stringa di connessione per libautoz dal file di configurazione: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile leggere la stringa di connessione per libzakautho dal file di configurazione.");
return 0;
}
gdacon = gda_connection_open_from_string (NULL, cnc_string, NULL, 0, &error);
if (gdacon == NULL)
{
- g_warning ("Impossibile creare la connessione al db per libautoz: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile creare la connessione al db per libzakautho: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
return 0;
}
- commons->autoz = autoz_new ();
+ commons->autoz = zak_autho_new ();
if (commons->autoz == NULL)
{
- g_warning ("Impossibile creare l'oggetto per libautoz.");
+ g_warning ("Impossibile creare l'oggetto per libzakautho.");
return 0;
}
- if (!autoz_load_from_db (commons->autoz, gdacon, NULL, TRUE))
+ if (!zak_autho_load_from_db (commons->autoz, gdacon, NULL, TRUE))
{
- g_warning ("Impossibile caricare la configurazione per libautoz dal db.");
+ g_warning ("Impossibile caricare la configurazione per libzakautho dal db.");
return 0;
}
- commons->role_utente = autoz_get_role_from_id (commons->autoz, commons->utente);
+ commons->role_utente = zak_autho_get_role_from_id (commons->autoz, commons->utente);
if (commons->role_utente == NULL)
{
- g_warning ("Utente «%s» non trovato nell configurazione di libautoz.", commons->utente);
+ g_warning ("Utente «%s» non trovato nell configurazione di libzakautho.", commons->utente);
return 0;
}
- if (!autoz_is_allowed (commons->autoz, commons->role_utente, autoz_get_resource_from_id (commons->autoz, "messi_ro"), FALSE)
- && !autoz_is_allowed (commons->autoz, commons->role_utente, autoz_get_resource_from_id (commons->autoz, "messi_rw"), FALSE))
+ if (!zak_autho_is_allowed (commons->autoz, commons->role_utente, zak_autho_get_resource_from_id (commons->autoz, "messi_ro"), FALSE)
+ && !zak_autho_is_allowed (commons->autoz, commons->role_utente, zak_autho_get_resource_from_id (commons->autoz, "messi_rw"), FALSE))
{
g_critical ("Non si è autorizzati all'utilizzo di questa applicazione.");
return 0;
}
- commons->autozgui_commons->prefix = g_strdup ("");
-
- commons->autozgui_commons->gdacon = gdacon;
- commons->autozgui_commons->gdaparser = gda_connection_create_parser (commons->autozgui_commons->gdacon);
- if (!commons->autozgui_commons->gdaparser)
- {
- /* @cnc doe snot provide its own parser => use default one */
- commons->autozgui_commons->gdaparser = gda_sql_parser_new ();
- }
-
- commons->gdaex_autozgui = gdaex_new_from_connection (gdacon);
-
- /* leggo i parametri per libaudit */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "AUDIT", "cnc_string", &error);
+ /* leggo i parametri per libzakaudit */
+ cnc_string = zak_confi_path_get_value (confi, "ZAKAUDIT/cnc_string");
if (cnc_string == NULL)
{
- g_warning ("Impossibile leggere la stringa di connessione per libaudit dal file di configurazione: %s\n",
- error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile leggere la stringa di connessione per libzakaudit dal file di configurazione.");
return 0;
}
audit = zak_audit_new_from_string (cnc_string);
if (audit == NULL)
{
- g_warning ("Errore nella creazione dell'oggetto per libaudit.\n");
+ g_warning ("Errore nella creazione dell'oggetto per libzakaudit.");
return 0;
}
commons->solipa = solipa_new ();
/* leggo la stringa di connessione al db territorio */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "DB_TERRITORIO", "cnc_string", &error);
+ cnc_string = zak_confi_path_get_value (confi, "DB_TERRITORIO/cnc_string");
if (cnc_string == NULL)
{
- if (error != NULL)
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione: %s", error->message);
- }
- else
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
- }
+ g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
}
commons->territorio_commons->gdaex = gdaex_new_from_string (cnc_string);
g_error ("Errore nella connessione al database: %s", cnc_string);
}
- /* leggo i parametri per libautoz di territorio */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "AUTOZ_TERRITORIO", "cnc_string", &error);
+ /* leggo i parametri per libzakautho di territorio */
+ cnc_string = zak_confi_path_get_value (confi, "ZAKAUTHO_TERRITORIO/cnc_string");
if (cnc_string == NULL)
{
- g_warning ("Impossibile leggere la stringa di connessione per libautoz dal file di configurazione: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile leggere la stringa di connessione per libzakautho dal file di configurazione.");
return 0;
}
gdacon = gda_connection_open_from_string (NULL, cnc_string, NULL, 0, &error);
if (gdacon == NULL)
{
- g_warning ("Impossibile creare la connessione al db per libautoz di territorio: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile creare la connessione al db per libzakautho di territorio: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
return 0;
}
- commons->territorio_commons->autoz = autoz_new ();
+ commons->territorio_commons->autoz = zak_autho_new ();
if (commons->territorio_commons->autoz == NULL)
{
- g_warning ("Impossibile creare l'oggetto per libautoz.");
+ g_warning ("Impossibile creare l'oggetto per libzakautho.");
return 0;
}
- if (!autoz_load_from_db (commons->territorio_commons->autoz, gdacon, NULL, TRUE))
+ if (!zak_autho_load_from_db (commons->territorio_commons->autoz, gdacon, NULL, TRUE))
{
- g_warning ("Impossibile caricare la configurazione per libautoz dal db.");
+ g_warning ("Impossibile caricare la configurazione per libzakauto dal db.");
return 0;
}
- commons->territorio_commons->role_utente = autoz_get_role_from_id (commons->territorio_commons->autoz, commons->territorio_commons->utente);
+ commons->territorio_commons->role_utente = zak_autho_get_role_from_id (commons->territorio_commons->autoz, commons->territorio_commons->utente);
if (commons->territorio_commons->role_utente == NULL)
{
- g_warning ("Utente \"%s\" non trovato nell configurazione di libautoz.", commons->territorio_commons->utente);
+ g_warning ("Utente \"%s\" non trovato nell configurazione di libzakautho.", commons->territorio_commons->utente);
return 0;
}
/* leggo la stringa di connessione al db organigramma */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "DB_ORGANIGRAMMA", "cnc_string", &error);
+ cnc_string = zak_confi_path_get_value (confi, "DB_ORGANIGRAMMA/cnc_string");
if (cnc_string == NULL)
{
- if (error != NULL)
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione: %s", error->message);
- }
- else
- {
- g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
- }
+ g_error ("Impossibile leggere la stringa di connessione dal file di configurazione.");
}
commons->organigramma_commons->gdaex = gdaex_new_from_string (cnc_string);
g_error ("Errore nella connessione al database: %s", cnc_string);
}
- /* leggo i parametri per libautoz di organigramma */
- error = NULL;
- cnc_string = g_key_file_get_value (config, "AUTOZ_ORGANIGRAMMA", "cnc_string", &error);
+ /* leggo i parametri per libzakautho di organigramma */
+ cnc_string = zak_confi_path_get_value (confi, "ZAKAUTHO_ORGANIGRAMMA/cnc_string");
if (cnc_string == NULL)
{
- g_warning ("Impossibile leggere la stringa di connessione per libautoz dal file di configurazione: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile leggere la stringa di connessione per libzakautho dal file di configurazione.");
return 0;
}
gdacon = gda_connection_open_from_string (NULL, cnc_string, NULL, 0, &error);
if (gdacon == NULL)
{
- g_warning ("Impossibile creare la connessione al db per libautoz di organigramma: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
+ g_warning ("Impossibile creare la connessione al db per libzakautho di organigramma: %s.\n", error != NULL && error->message != NULL ? error->message : "nessun dettaglio");
return 0;
}
- commons->organigramma_commons->autoz = autoz_new ();
+ commons->organigramma_commons->autoz = zak_autho_new ();
if (commons->organigramma_commons->autoz == NULL)
{
- g_warning ("Impossibile creare l'oggetto per libautoz.");
+ g_warning ("Impossibile creare l'oggetto per libzakautho.");
return 0;
}
- if (!autoz_load_from_db (commons->organigramma_commons->autoz, gdacon, NULL, TRUE))
+ if (!zak_autho_load_from_db (commons->organigramma_commons->autoz, gdacon, NULL, TRUE))
{
- g_warning ("Impossibile caricare la configurazione per libautoz dal db.");
+ g_warning ("Impossibile caricare la configurazione per libzakautho dal db.");
return 0;
}
- commons->organigramma_commons->role_utente = autoz_get_role_from_id (commons->organigramma_commons->autoz, commons->organigramma_commons->utente);
+ commons->organigramma_commons->role_utente = zak_autho_get_role_from_id (commons->organigramma_commons->autoz, commons->organigramma_commons->utente);
if (commons->organigramma_commons->role_utente == NULL)
{
- g_warning ("Utente \"%s\" non trovato nell configurazione di libautoz.", commons->organigramma_commons->utente);
+ g_warning ("Utente \"%s\" non trovato nell configurazione di libzakautho.", commons->organigramma_commons->utente);
return 0;
}
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <gdk/gdkkeysyms.h>
-#include <libautoz/autoz.h>
+#include <libzakautho/autoz.h>
#include <libsolipa/libsolipa.h>
#include <liborganigramma/ufficio.h>
*registro_new (Commons *commons, gboolean selezione)
{
GError *error;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
Registro *a = REGISTRO (g_object_new (registro_get_type (), NULL));
registro_carica (a);
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, "messi_rw");
- if (!autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, "messi_rw");
+ if (!zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
{
}
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
RegistroPrivate *priv = REGISTRO_GET_PRIVATE ((Registro *)user_data);
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <gdk/gdkkeysyms.h>
-#include <libautoz/autoz.h>
+#include <libzakautho/autoz.h>
#include <libsolipa/libsolipa.h>
#include "tipiatto.h"
*tipi_atto_new (Commons *commons, gboolean selezione)
{
GError *error;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
TipiAtto *a = TIPI_ATTO (g_object_new (tipi_atto_get_type (), NULL));
tipi_atto_carica (a);
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, "opengov_tab_tipi_atto_rw");
- if (!autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, "opengov_tab_tipi_atto_rw");
+ if (!zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
{
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button211")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button213")), FALSE);
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
TipiAttoPrivate *priv = TIPI_ATTO_GET_PRIVATE ((TipiAtto *)user_data);
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include <gdk/gdkkeysyms.h>
-#include <libautoz/autoz.h>
+#include <libzakautho/autoz.h>
#include <libgtkform/form.h>
#include "tipoatto.h"
*tipo_atto_new (Commons *commons, gint id)
{
GError *error;
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
TipoAtto *a = TIPO_ATTO (g_object_new (tipo_atto_get_type (), NULL));
tipo_atto_carica (a);
}
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, "opengov_tab_titoli_rw");
- if (!autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, "opengov_tab_titoli_rw");
+ if (!zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE))
{
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button224")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "button34")), FALSE);
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
TipoAttoPrivate *priv = TIPO_ATTO_GET_PRIVATE ((TipoAtto *)user_data);
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
TrovaAtti *a = (TrovaAtti *)user_data;
TrovaAttiPrivate *priv = TROVA_ATTI_GET_PRIVATE (a);
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
ret = TRUE;
/* per adesso controllo solo gli uffici */
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
- ret = autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
+ ret = zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
return ret;
}
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
TrovaAttiPrivate *priv = TROVA_ATTI_GET_PRIVATE ((TrovaAtti *)user_data);
-/*
- * Copyright (C) 2013 Andrea Zagli <azagli@libero.it>
+/*
+ * Copyright (C) 2013-2016 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
TrovaRegistro *a = (TrovaRegistro *)user_data;
TrovaRegistroPrivate *priv = TROVA_REGISTRO_GET_PRIVATE (a);
- AutozIResource *ires1;
+ ZakAuthoIResource *ires1;
ret = TRUE;
/* per adesso controllo solo gli uffici */
- ires1 = autoz_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
- ret = autoz_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
+ ires1 = zak_autho_get_resource_from_id (priv->commons->autoz, g_strdup_printf ("opengov_u_%d_r_0", id));
+ ret = zak_autho_is_allowed (priv->commons->autoz, priv->commons->role_utente, ires1, FALSE);
return ret;
}
GdkEventKey *event,
gpointer user_data)
{
- if (event->keyval == GDK_Escape)
+ if (event->keyval == GDK_KEY_Escape)
{
TrovaRegistroPrivate *priv = TROVA_REGISTRO_GET_PRIVATE ((TrovaRegistro *)user_data);