Record Level Security

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Record Level Security

Postby ebrandt » Tue Aug 10, 2004 10:06 pm

In FM you could use a calculation to define record level access. ex:
RepID = 123 (Per Table)

This way it was easy to implement security without a lot of coding using the same forms. Administering FM solutions with multiple tables was a nightmare due to their data model, but that was one nice feature when having 100's of users.

With servoy I was hoping to implement record level security as well, using the same forms, allowing indivduals only access to their records.

I am sure this is possible using methods, but I was really hoping to avoid multiple methods passing variables from form to form. Can someone provide me with some direction as to the easiest way to accomplish this.
I will have local users / terminal server clients and wide area users.
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl

Postby automazione » Wed Aug 11, 2004 12:04 am

If I'm not wrong you probably are looking for addFoundSetFilterParam . Is a form function that adds a PERMANENT filter to a foundset.

//Add a filter parameter to limit the foundset permanently
var success = controller.addFoundSetFilterParam('customerid', '=', 'BLONP');//possible to add multiple
controller.loadAllRecords();//to make param(s) effective
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby ebrandt » Wed Aug 11, 2004 3:30 am

Excellent,
Thank you for your help!
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl

Postby ebrandt » Wed Aug 11, 2004 3:36 am

Would it be possible to apply a method to a security group? Would this not be an effective alternative parameter , possibly offering more robust security administration?
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl

Postby bcusick » Wed Aug 11, 2004 7:40 pm

You can already GET the name of the current group via a method - so you could execute whatever method you want in response.

Also, a slight clarification:

...controller.addFoundSetFilterParam is a form function that adds a PERMANENT filter to a foundset.


This is true only for a particular SESSION. If the user quits Servoy or closes the solution, the FoundSetFilterParam is reset to nothing.

Hope this helps,

Bob Cusick
Last edited by bcusick on Wed Aug 11, 2004 7:46 pm, edited 1 time in total.
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby ebrandt » Wed Aug 11, 2004 7:43 pm

Perfect,

muchas gracias
ebrandt
 
Posts: 590
Joined: Tue Mar 30, 2004 6:54 pm
Location: largo, fl


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 28 guests

cron