Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 To: solomon sackey
  Where is solomon sackey?
 texas
 Texas - United States
 solomon sackey
 Tags
Subject: RE: menus for different user groups
Thread ID: 155112 Message ID: 155116 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: Menus
Date: Tuesday, December 25, 2007 9:40:40 AM         
   


> what is the best approach for dealing with menus for different user groups?
>
> Do you create various executables or us .mpr?
>
> thanks.

First of all, install GenMenuX from Andrew R. McNeill and make that the default menugenerator.
Just googling for GenMenuX will bring you to his site.

Then, read the docs that ship with it.
The basic step is to save the usergroup identifier, like in your application object.
The Next step then is to add something like this in the comment field of the menu item you want to selectively display.

*:IF ApplicationObject.UsergroupIdentifier=1 or ApplicationObject.UsergroupIdentifier=2

This will, through the use of GenMenuX, generate a function in the resulting mpr file that will display the menuitem ONLY if the logged user is a member of usergroup 1 or 2 (or whatever type of usergroups you do indentify.

The advantage of this is that you only have to maintain ONE menufile instead of a bunch of them, and you only have to maintain ONE project instead of a bunch of projects.

Boudewijn LutgeĀ®ink
http://www.vfpdevelopers-online.com
Women and Cats just do their own thing, men and dogs should relax and accept this fact of life.

ENTIRE THREAD

menus for different user groups Posted by solomon sackey @ 12/25/2007 7:12:38 AM
RE: menus for different user groups Posted by Boudewijn Lutgerink @ 12/25/2007 9:40:40 AM
RE: menus for different user groups Posted by Ken Murphy @ 12/25/2007 12:34:17 PM
RE: menus for different user groups Posted by solomon sackey @ 12/29/2007 3:02:42 AM
RE: menus for different user groups Posted by Ken Murphy @ 12/29/2007 6:11:29 AM
RE: menus for different user groups Posted by solomon sackey @ 12/29/2007 8:50:35 AM
RE: menus for different user groups Posted by Ken Murphy @ 12/29/2007 1:42:48 PM
RE: menus for different user groups Posted by Benny Thomas @ 12/25/2007 9:41:40 PM