Information générale
Catégorie:
Gestionnaire de menu & Menus
In my case, I've expanded on my original suggestion by assigning a unique "code" to every menu item and passing that to the SKIP FOR subroutine.
Eack "code" identifies a different Form, Report or Process.
In the "User" table there are multiple records for each User; one record for each Form, Report or Process the User has access to ... keyed by UserId + "Code".
Each of these "User records" contains a flag that (in the case of a Form) indicates whether or not a user can Add and/or Update and/or Delete.
So, besides using the "SKIP FOR routine" to disable menu items for a given User, the same routine can also be called by a Form (using the Form's "ID code" ) to determine a User's access rights for that Form. The access rights can subsequently be stored in properties of the Form.
In a "multi-tasking" application, a User can have multiple Forms open; one needs to be able to set access rights for each Form individually. A set of "global variables" may be too limiting; you may need something more dynamic (like a subroutine that you can call at will).
>i've solved this matter like this. i added level c(1) field to user.dbf and for admin i set 1 for the others 2 or greater than 1 . i put gclevel public variable to the start.prg . when the user logon via login form form unload event loads level value to gclevel variable . and menu skip for code gclevel > "1" . this works fine and menu behaviour as user level . Next step i want to do this. User should acces to the some menus but can't delete or edit . As my method what should i do for this actions ?
>
>TIA
>
>PS: i've standart toolbar for navigation and add,edit,delete vs actions..
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement