Hi all,
I am trying to play with servoy security option in my servoy sample solution but i am stuck.
My problem is let i have to user A,B from different user groups admin and user respectively. I implement access control over table according to user logged in.
I have table tbl_accessctrl. Now i want.
1 When user A logged in he has all the access like read,insert,update and delete. A is related from admin group.
2.When user B logged in he has only right to read the form. B is related from users group.
When either or them login first the setting persistent, if i am login from other user also. I want to reset the security settings without restart or without open other solution.
here is my sample code.
var sUserGroup = (security.getUserGroups(userUID)).getValue(1,2);
var colNames = new Array();
colNames[0] = ‘id’;
colNames[1] = ‘flags’;
var dataset = databaseManager.createEmptyDataSet(0,colNames);
var row = new Array();
row[0] = ‘example_data.orders’;
if(sUserGroup == ‘users’)
row[1] = 1;
else
row[1] = 0;
dataset.addRow(row);//setting table security
security.setSecuritySettings(dataset);
Thanks