ahh sorry
look at the security node in the tree. There you see a extra node below it that is a list with returntypes (currently just one JSDataSet)
and if you look at the method call:
security.getUserGroups(a);
you see that getUserGroups returned a JSDataSet object
so on youre groep variable you can call:
groep.getMaxRowIndex();
or
groep.getValue(row,column);
for every function you can call on groep see the node under the security node.
I am sorry, but the light is not blinking
Can you give some more examples on how to use this feature, for example:
how can I add a new user to a specific group?
how can I retrieve information of a user?
HJK:
Does anybody know how this works.?
I am getting stuck here!
I think what is being explained is the following.
Some of the functions in Servoy return a data set. In this case the data set is a JavaScript data set. This means, what is returned is an array. You then have to use JavaScript to work code against the data set. Pulling out values for comparisons, etc.
When a data or row index of -1 is returned then this means a zero found set. It looks like you need to be logged into the system in order to get a return from the new security features. Since working with Developer means you don’t have to log in you will get return values that aren’t that useful for testing.
This means for some features you will need to log into a client version to test your features.
Unless the programmers add in a feature where you can “emulate” a login, while in Developer, there are some things that will require testing through a client.
Of course, I could be completely wrong and I’m sure I’ll be corrected by one of the Servoy folks.
I think you have to log into develloper as well as client. But first you have to set the “Login required” flag under security to “yes” and create user etc.
for the solutions i created with a logon required, I also have to login in develloper.
Also, I use functions so log every session of my solution in a table. For that I used to use the “get username” command, to write the user name in a text field.
All my develloper sessions are tracked as well, so that also tells me that in develloper these functions are available
var set = security.getUserGroups()
elements.test.text = ‘’+set.getAsHTML()+‘’; //elements.test.text = set.getValue(1,2)
Test = the name of a label on a form
The -1 means there are no results
The sample code for the GetDatasetByQuery function gives a good example how to loop through a dataset and evaluate the dataset and take action based on the results of the evaluation.
Adding users/usergroups etc is not available as far as I know, but I’m sure it’s on “the List”