Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: kirti bhardwaj
  Where is kirti bhardwaj?
 Chandigarh
 India
 kirti bhardwaj
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: Menu customization at runtime
Thread ID: 267235 Message ID: 268716 # Views: 30 # Ratings: 0
Version: Visual FoxPro 9 Category: Windows Vista and VFP
Date: Wednesday, July 14, 2010 8:39:19 AM         
   


> > Can you please also send me the method "osecurity()"
> >
> > kirti bhardwaj
>
> Why? That is a method in a security class I wrote and uses SQLServer tables, so next you'll ask for the tables as well?
> Also my set of base classes used in every form contains code that uses this Security object. Just getting the code for that method will do you no good as the Object is data driven.
>
> To keep it simple, just have a table with fields like this for every menu item
>
>
MENUID MENUITEM  
> 1      File
> 2      Open
> 3      Customers
> 4      Reports

>
> Then have another table like this for each user
>
>
USERID     MENUID
> khardwaj     1
> khardwaj     2
> khardwaj     4
> 

>
>
> Now some simple code will check which MENUID's the user khardwaj has access to - in this case 1, 2, 4 so item 3 will return .F. and will be hidden by the code I gave you.
>
> Just create your own method to verify the user status and return .T. for showing and .F. for hiding and my code will do the needful.
>
> Bernard
>
> ** If you see someone without a smile, give em one of yours :) **
> My Blog

Don't worry sir i m not going to ask you abt the tables. I also made a security program but it just terminate the user for using those particular options whose security level is above that security level which was assigned to the user. I just want to hide those options which he was not able to access from him.

kirti bhardwaj

ENTIRE THREAD

Menu customization at runtime Posted by kirti bhardwaj @ 7/3/2010 11:38:28 AM
RE: Menu customization at runtime Posted by Benny Thomas @ 7/3/2010 12:01:27 PM
RE: Menu customization at runtime Posted by Samir H. @ 7/3/2010 12:57:04 PM
RE: Menu customization at runtime Posted by fox xing @ 7/4/2010 5:23:52 AM
RE: Menu customization at runtime Posted by tushar @ 7/4/2010 6:06:49 AM
RE: Menu customization at runtime Posted by Bernard Bout @ 7/5/2010 8:59:12 AM
RE: Menu customization at runtime Posted by kirti bhardwaj @ 7/8/2010 2:42:25 PM
RE: Menu customization at runtime Posted by Bernard Bout @ 7/8/2010 6:33:45 PM
RE: Menu customization at runtime Posted by kirti bhardwaj @ 7/14/2010 8:39:19 AM
RE: Menu customization at runtime Posted by Tamar Granor @ 7/9/2010 10:59:59 PM