Package Gnumed :: Package wxpython :: Module gmAuthWidgets
[frames] | no frames]

Module gmAuthWidgets

source code

GNUmed authentication widgets.

This module contains widgets and GUI functions for authenticating users.


Author: karsten.hilbert@gmx.net, H.Herb, H.Berger, R.Terry

License: GPL v2 or later (details at http://www.gnu.org)

Classes
  cBackendProfile
  cLoginDialog
cLoginDialog - window holding cLoginPanel
  cLoginPanel
GUI panel class that interactively gets Postgres login parameters.
Functions
 
_(x) source code
 
connect_to_database(max_attempts=3, expected_version=None, require_version=True)
Display the login dialog and try to log into the backend.
source code
 
get_dbowner_connection(procedure=None, dbo_password=None, dbo_account=u'gm-dbo') source code
 
change_gmdbowner_password() source code
Variables
  msg_generic = '\nGNUmed database version mismatch.\n\nThis dat...
  msg_time_skew_fail = 'The server and client clocks are off\nby...
  msg_time_skew_warn = 'The server and client clocks are off\nby...
  msg_insanity = '\nThere is a serious problem with the database...
  msg_fail = '\nYou must connect to a different database in orde...
  msg_override = '\nThe client will, however, continue to start ...
  __package__ = 'Gnumed.wxpython'

Imports: sys, os, logging, regex, wx, gmLoginInfo, gmPG2, gmBackendListener, gmTools, gmCfg2, gmI18N, gmPraxis, gmGuiHelpers, gmExceptionHandlingWidgets


Function Details

connect_to_database(max_attempts=3, expected_version=None, require_version=True)

source code 
Display the login dialog and try to log into the backend.

- up to max_attempts times
- returns True/False


Variables Details

msg_generic

Value:
'''
GNUmed database version mismatch.

This database version cannot be used with this client:

 client version: %s
 database version detected: %s
 database version needed: %s
...

msg_time_skew_fail

Value:
'''The server and client clocks are off
by more than %s minutes !

You must fix the time settings before
you can use this database with this
client.

You may have to contact your
...

msg_time_skew_warn

Value:
'''The server and client clocks are off
by more than %s minutes !

You should fix the time settings.
Otherwise clinical data may appear to
have been entered at the wrong time.

You may have to contact your
...

msg_insanity

Value:
'''
There is a serious problem with the database settings:

%s

You may have to contact your administrator for help.'''

msg_fail

Value:
'''
You must connect to a different database in order
to use the GNUmed client. You may have to contact
your administrator for help.'''

msg_override

Value:
'''
The client will, however, continue to start up because
you are running a development/test version of GNUmed.

There may be schema related errors. Please report and/or
fix them. Do not rely on this database to work properly
in all cases !'''