Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using skip for options as user rights in menus
Message
De
15/03/2003 23:37:46
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00765840
Message ID:
00766261
Vues:
22
Assign a "code" to each menu option and create a function/procedure to which you pass this "code" and use the function to access the active "user" and user.dbf and check their access priviliges; eg:
DEFINE BAR 31 OF Menu_View PROMPT "\<Material Items" ;
   SKIP FOR Test_For_Skip( "Form" )
ON SELECTION BAR 31 OF Menu_View ;
   DO ...

...

PROCEDURE Test_For_Skip
   LPARAMETER PC_Code

   IF !SEEK( <Active User>, "User" )
      RETURN .T.
   ENDIF 

   DO CASE
   CASE PC_Code = "Form" 
      RETURN !User.Forms
   ...
   ENDCASE
>Hi All,
>i have a user.dbf with the fiels userid c(10),username c(15),password c(10),forms L,reports L tools L, etc..
>
> for eg . if the active user is ADMIN his properties on user.dbf is forms T,reports T,tools T in this situation these menus should be active , when the active user is USER and his properties on user.dbf is forms T,reports T,tools F ... tools menu should disable for this user .
>
>how can i use this logical situations in menu skip for option ? and how can i use this user.dbf while these actions occur ?
>
>TIA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform