Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Managing user permissions
Message
 
 
To
14/07/2000 02:24:33
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00392251
Message ID:
00392259
Views:
9
>Hi All,
>
>My problem is that I have to manage somehow different user permissions. I have a table where I store the user rigths per form. The form permissions are working well, if somebody has not permission to open the form, or open in read only mode etc.
>But the problem is that on some forms I have cost fields which I have to hide also in some cases, even if a user has a full (read/write) permission for the form can be that he can not see these special fields.
>Also has to consider reports, I mean if we see the example described above how can I hide these special cost fields?
>
>Thanks in advance
>
>Ivan

Ivan,
Basically you need to expand your form-level concept to include whatever you want to secure (e.g. controls, reports, whatever).

As Jess said, you would need to add code to your Init methods to query the table using the name of the object and the current user. If the current user can see the object, then set its visible property to .T. otherwise you can set it to .F. or simply return .F. to not even instantiate the object.

The name can be unique ID assigned to the object or it can be the full hierarchical name of the object (e.g. form.container.container.object). Granted this can be a very large name and the field in the table could exceed the limits of field lengths so it is better to assign an ID to it.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform