Copyright 2007 by gINT Software. All rights reserved worldwide.
GR014.TXT
gINT Rules Code Samples - 014
Requires gINT version 8.1.016 or later.
NOTE: Code samples are provided free of charge and as-is. gINT Software makes no claim or warranty as to the accuracy of the samples. It is the responsibility of the user to ensure that the code performs as it should. Comments, suggestions, and error reports are appreciated.
Description
===========
Hides application groups and/or applications on the system event "On Library Open" depending on the user name. The list of user names and application groups/applications are defined in the library table provided in the library (GR014 PERSONNEL). You can add and remove application groups and applications from the list of fields in that table and change the code in GR014.LibraryOpen appropriately. The current list is not one you would probably use. For one the entire Data Design application group is exposed to everyone. This was done so that you can move to Data Design:Library Data and add your login name to the GR014 PERSONNEL table. If this was hidden on startup no one could ever add their names to this list. Once you have added your login to the list, you can then hide this application (perhaps even the entire application group) for users that don't have rights. Alternatively, you can restrict modification rights to this library table only but leave the application exposed (see GR009 for how to do this).
On opening a library with this code attached (and referenced in the gINT Rules:System Events:On Library Open property), the code queries the operating system for the network login name of the current user and then looks him/her up in the library table. If that person is not found, a message is shown to contact the system administrator and all applications and groups defined in the library table are hidden to the user. If the user is found in the list, they will have access only the applications and groups assigned to that user.
*************************************************
Revision History
================
28 May 2007:
Initial upload
*************************************************
INCLUDED FILES:
GR014.GLB:
gINT Rules code modules:
GR014 Main
CheckApplicationRights
LibraryOpen
Library Tables: GR014 PERSONNEL
gINT Rules on System Events
*************************************************
INSTALLATION PROCEDURE:
Copy the files wherever you prefer. To see the gINT Rules code modules you must either merge the GLB into your library (Utilities:Lib Merge/Copy) or change to the included library (File:Change Library).
*************************************************