DNS views, part 22

Issue #26

Begin phase 2 : RR virtualization

This commit provides:
- document new database schema:
    doc/netmagis.org/tables.fig
- push back view id from peripheral tables
    (dns.rr_*) to main RR table (dns.rr)
- emulate old behaviour (multiple views in
    the trr array returned by read-rr-by-*)
    in access functions (rr-*-by-view)
- context is now always single view (before,
    it was single view except in www/cgi/add
    and www/cgi/admlmx)
- read-rr-by-name now needs a view id
- check-authorized-host now needs only one view
- no more role web
- menu-view procedure no longer issue a listbox,
    but always a menu (or hidden field)
- put a show-stopper on eq-graph-status to
    remember to adapt it for views
Database schema internationalization, step 2

Translate database schema (table and column names)
into English.

Step2:
- translate the dns.network (old: dns.reseau) and
    dns.p_network (old: dns.dr_reseau) tables and
    column names
- translate tri and network parameters in CGI forms
    and %...% holes
- begin to update implicit constraint names by
    removing old constraints (on old table names)
    and rebuild them with the new table names
Database schema internationalization, step 3

Translate database schema (table and column names)
into English.

Step 3:
- translate the dns.organization (old: dns.etablissement)
    and propagate renaming of column idorg (old: idetabl)
- translate etabl variables, CGI forms and %...% holes
- propagate file renaming in freebsd port file list
Database schema internationalization, step 4

Translate database schema (table and column names)
into English.

Step 4:
- translate the dns.p_ip (old: dns.dr_ip) table and column
    addr (old: adr)
- translate the dns.p_view (old: dns.dr_view) table
- fix some anchors in help-net.htgt
- translate some CGI form parameters
Database schema internationalization, step 5

Translate database schema (table and column names)
into English.

Step 5:
- translate the dns.p_dom (old: dns.dr_dom) table and column
    sort (old: tri)
- remove the never used roleweb column of dns.p_dom table
- translate the dns.hinfo columns text (old: texte) and sort
    (old: tri)
- translate the dns.zone* column gen (old: generer)
- translate the dns.rr_mx column prio (old: priorite)
- translate the dns.rr_relay_dom (old: dns.relais_dom) table
    and column prio (old: priorite)
- translate some CGI form parameters
Database schema internationalization, step 6

Translate database schema (table and column names)
into English.

Step 6:
- translate the columns names key and value (old: clef and
    valeur) in global.config table
Database schema internationalization, step 7

Translate database schema (table and column names)
into English.

Step 7:
- translate column names in pgauth.user table:
    lastname (old: nom)
    firstname (old: prenom)
    mail (old: mel)
    phone (old: tel)
    addr (old: adr)
    phlast (old: phnom)
    phfirst (old: phprenom)
- rework ::webapp::authbase class and attribute
    map, such as attributes are in english
- rework pgauth subsystem in order to use these
    attribute names
- propagate these new attributes names in tabuid()
    array used through Netmagis
- translate some %...% holes and CGI form parameters

phew !
DNS views, part 23

Issue #26

End phase 2 : RR virtualization

This commit provides:
- various fixes
- code refactoring in filter-views
- improve error message in filter-views when
    the name does not exist in any view
- improve error message in check-authorized-host
    by giving mbox host for an existing mail role
- adapt mod & del CGI scripts for RR virtualization
Detect IP permissions outside any allowed network

Close issue #93

This commit provides:
- bug fix in www/cgi/perm: display allow permissions
    outside allowed networks
- bug fix in www/cgi/admgrp: detect permissions
    outside any allowed networks, and not only permissions
    larger than any allowed networks
- clarifies view/domain permissions in display-group
Clarify some error messages

When removing a host which happens to be
the target of a MX or a mail relay for a
domain, displays an explicit error message
rather than a cryptic message from a SQL
integrity constraint violation.
Database schema internationalization, step 8

Translate database schema (table and column names)
into English.

Step 8:
- translate the dns.dhcpprofile (old: dns.dhcpprofil)
    table and columns iddhcpprof (old: iddhcpprofil),
    name (old: nom) and text (old: texte)
- translate the dns.p_dhcpprofile (old: dns.dr_dhcpprofil)
    table and columns iddhcpprof (old: iddhcpprofil)
    and sort (old: tri)
- propagate the renaming of iddhcpprof column in dns.rr
    and dns.dhcprange tables
- translate trr(iddhcpprof) and trr(dhcpprof) accordingly
- translate iddhcpprof variables and check-iddhcpprof
    function
- translate some CGI form parameters and %...% holes
- fix a bug in dhcp range edition (CGI script dhcp)
    where profile sort order was not used, and the
    "No profile" was not translated from French
Reorder upgrade.sql file

Reordering has two objectives:
- minimize "NOTICE:" lines in constraint dropping
- align order of table/column renaming on order
    of table creation (in database/lib/sql22/schema-main.sql)
Database schema internationalization, step 9

Translate database schema (table and column names)
into English.

Step 9:
- translate the dns.rr_ip column addr (old: adr)
- translate all remaining "adr" to "addr" (CGI form
    parameters, %...% holes, variables, etc.)
- translate the dns.mail_role (old: dns.role_mail)
    table and columns mailaddr (old: idrr) and mboxhost
    (old: heberg)
- translate the dns.p_dom column mailrole (old: rolemail)
- translate the trr fields mailrole (old: rolemail) and
    mailaddr (old: adrmail) as well as associated
    functions (rr-xxx-by-view)
Database schema internationalization

Translate database schema (table and column names)
into English.

Followup to 3daad129db56645a3ad73f99d6ffe7fc5ef08ed9
- translate idcomm (old: idcommu) in tables
    dns.network and dns.community

Followup tp aec4c3df74ac93a78ac680a438416bba9dac7c54
- translate name (old: text) in table dns.hinfo
Database schema internationalization, step 10

Translate database schema (table and column names)
into English.

Step 10:
- translate some columns of dns.rr table: name (old: nom),
    comment (old: commentaire), respname (old: respnom),
    respmail (old: respmel) and sendttl (old: droitttl)
- translate matching indexes in trr() array (read-rr-by-id
    function), CGI form parameters, variables, function
    names, etc.

=> note: this implies a change in detecteq/radius/topo.conf
Database schema internationalization, step 11

Translate database schema (table and column names)
into English.

Step 11:
- translate table global.nmgroup (old: global.groupe)
    and columns name (old: nom), p_admin (old: admin),
    p_smtp (old: droitsmtp), p_ttl (old: droitttl),
    p_mac (old: droitmac) and p_genl (old: droitgenl)
- translate matching indexes in tabuid() array
- translate table global.nmuser (old: global.corresp)

Note: column idcor is unchanged.
Database schema internationalization, last step (12)

Translate database schema (table and column names)
into English.

Step 12:
- translate table dns.zone_forward (old: dns.zone_normale)

This commit ends the "database schema internationalization"
series.
Database schema internationalization, last step (13)

Translate database schema (table and column names)
into English.

Step 13:
- translate table topo.p_eq (old: topo.dr_eq)
- translate some random %...% holes

This commit really ends the "database schema
internationalization" series.
Convert topo.ifchanges/idrr to equipment name

Adding views to topo.ifchanges is somewhat
difficult, and the added complexity is not
judged useful. So, replace the idrr column
of topo.ifchanges by an "eq" text column
which contains a FQDN.

View is then determined by the location in
the network of the toposendd program.

Warning: these changes have not yet been
fully tested, since it needs a testbed that
I don't have.
Merge branch 'views'