{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\{table:class=servoy sReturnTypes}{tr:style=height: 30px;}{th}Return Types{th}{tr}{tr}{td}{span:class=sWordList}[FORMSECURITY]{span}{span:class=sWordList}[TABLESECURITY]{span}{td}{tr}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#ACCESSIBLE]
Constant representing the accessible flag for form security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#DELETE]
Constant representing the delete flag for table security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#INSERT]
Constant representing the insert flag for table security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#READ]
Constant representing the read flag for table security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#TRACKING]
Constant representing the tracking flag for table security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#UPDATE]
Constant representing the update flag for table security.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#VIEWABLE]
Constant representing the viewable flag for form security.{td}{tr}{tbody}{table}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#addUserToGroup]\(a_userUID, groupName)
Adds an user to a named group.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canDelete]\(serverName, tableName)
Returns a boolean value for security rights.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canInsert]\(serverName, tableName)
Returns a boolean value for security rights.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canRead]\(serverName, tableName)
Returns a boolean value for security rights.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#canUpdate]\(serverName, tableName)
Returns a boolean value for security rights.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#changeGroupName]\(oldGroupName, newGroupName)
Changes the groupname of a group.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#changeUserName]\(a_userUID, username)
Changes the username of the specified userUID.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#checkPassword]\(a_userUID, password)
Returns true if the password for that userUID is correct, else false.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#createGroup]\(groupName)
Creates a group, returns the groupname (or null when group couldn't be created).{td}{tr}{tbody}{tbody}{tr}{td}Object{td}{td}[#createUser]\(username, password, userUID)
Creates a new user, returns new uid (or null when group couldn't be created or user alreay exist).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteGroup]\(groupName)
Deletes a group, returns true if no error was reported.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#deleteUser]\(userUID)
Deletes an user.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getClientID]\()
Returns the client ID.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getElementUUIDs]\(formname)
Returns the form elements UUID's as dataset, the one with no name is the form itself.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getGroups]\()
Get all the groups (returns a dataset).{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getSystemUserName]\()
Retrieves the username of the currently logged in user on operating system level.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getUserGroups]\(userUID)
Get all the groups of the current user, finds the goups for given user UID if passed as parameter.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getUserName]\(userUID)
Get the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getUserUID]\(username)
Get the current user UID (null if not logged in), finds the userUID for given user_name if passed as parameter.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#getUsers]\()
Get all the users in the security settings (returns a dataset).{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#login]\(display_username, a_userUID, groups)
Login to be able to leave the solution loginForm.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#logout]\(solutionToLoad, method, argument)
Logout the current user.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#removeUserFromGroup]\(a_userUID, groupName)
Removes an user from a group.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setPassword]\(a_userUID, password)
Set a new password for the given userUID.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setSecuritySettings]\(dataset)
Sets the security settings; the entries contained in the given dataset will override those contained in the current security settings.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#setUserUID]\(a_userUID, newUserUID)
Set a new userUID for the given userUID.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=7DF5EB81-07F9-4D0C-926C-260E4F8F6485}{tr:id=name}{td}h6.ACCESSIBLE{td}{tr}{tr:id=des}{td}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_des|text=|trigger=button}{sub-section}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_des|trigger=none|class=sIndent}Constant representing the accessible flag for form security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_ret|text=|trigger=button}{sub-section}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_see|text=|trigger=button}{sub-section}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_see|text=|trigger=button}{sub-section}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_sam|text=|trigger=button}{sub-section}{sub-section:7DF5EB81-07F9-4D0C-926C-260E4F8F6485_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=D9A5CF8A-088B-4028-9C33-08E41A614AF4}{tr:id=name}{td}h6.DELETE{td}{tr}{tr:id=des}{td}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_des|text=|trigger=button}{sub-section}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_des|trigger=none|class=sIndent}Constant representing the delete flag for table security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_ret|text=|trigger=button}{sub-section}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_see|text=|trigger=button}{sub-section}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_see|text=|trigger=button}{sub-section}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_sam|text=|trigger=button}{sub-section}{sub-section:D9A5CF8A-088B-4028-9C33-08E41A614AF4_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=867089CD-0900-48AA-A663-DAD5E0F81E0A}{tr:id=name}{td}h6.INSERT{td}{tr}{tr:id=des}{td}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_des|text=|trigger=button}{sub-section}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_des|trigger=none|class=sIndent}Constant representing the insert flag for table security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_ret|text=|trigger=button}{sub-section}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_see|text=|trigger=button}{sub-section}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_see|text=|trigger=button}{sub-section}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_sam|text=|trigger=button}{sub-section}{sub-section:867089CD-0900-48AA-A663-DAD5E0F81E0A_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F25D5B6F-90F6-4FAB-91EA-0897C856B74D}{tr:id=name}{td}h6.READ{td}{tr}{tr:id=des}{td}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_des|text=|trigger=button}{sub-section}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_des|trigger=none|class=sIndent}Constant representing the read flag for table security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_ret|text=|trigger=button}{sub-section}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_see|text=|trigger=button}{sub-section}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_see|text=|trigger=button}{sub-section}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_sam|text=|trigger=button}{sub-section}{sub-section:F25D5B6F-90F6-4FAB-91EA-0897C856B74D_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=754EAEBA-F3E8-4577-AECC-2DC63880C545}{tr:id=name}{td}h6.TRACKING{td}{tr}{tr:id=des}{td}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_des|text=|trigger=button}{sub-section}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_des|trigger=none|class=sIndent}Constant representing the tracking flag for table security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_ret|text=|trigger=button}{sub-section}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_see|text=|trigger=button}{sub-section}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_see|text=|trigger=button}{sub-section}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_sam|text=|trigger=button}{sub-section}{sub-section:754EAEBA-F3E8-4577-AECC-2DC63880C545_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CD10BA62-DAE6-4222-A3B8-6092C7B95783}{tr:id=name}{td}h6.UPDATE{td}{tr}{tr:id=des}{td}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_des|text=|trigger=button}{sub-section}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_des|trigger=none|class=sIndent}Constant representing the update flag for table security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_ret|text=|trigger=button}{sub-section}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_see|text=|trigger=button}{sub-section}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_see|text=|trigger=button}{sub-section}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_sam|text=|trigger=button}{sub-section}{sub-section:CD10BA62-DAE6-4222-A3B8-6092C7B95783_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1CB0DA0F-3B22-4D17-8C94-80575D384585}{tr:id=name}{td}h6.VIEWABLE{td}{tr}{tr:id=des}{td}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_des|text=|trigger=button}{sub-section}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_des|trigger=none|class=sIndent}Constant representing the viewable flag for form security.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_ret|text=|trigger=button}{sub-section}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_see|text=|trigger=button}{sub-section}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_see|text=|trigger=button}{sub-section}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_sam|text=|trigger=button}{sub-section}{sub-section:1CB0DA0F-3B22-4D17-8C94-80575D384585_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=50AC8939-F218-436F-AB7B-E26D718330FD}{tr:id=name}{td}h6.addUserToGroup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}addUserToGroup{span}{span:id=iets|style=float: left;}\(a_userUID, groupName){span}{td}{tr}{tr:id=des}{td}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_des|text=|trigger=button}{sub-section}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_des|trigger=none|class=sIndent}Adds an user to a named group.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_prs|trigger=none}a_userUID -- the user UID to be added
groupName -- the group to add to
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_ret|text=|trigger=button}{sub-section}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_ret|trigger=none|class=sIndent}[Boolean] -- true if added{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_see|text=|trigger=button}{sub-section}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_see|text=|trigger=button}{sub-section}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_sam|text=|trigger=button}{sub-section}{sub-section:50AC8939-F218-436F-AB7B-E26D718330FD_sam|class=sIndent|trigger=none}{code:language=javascript}
var userUID = security.getUserUID();
security.addUserToGroup(userUID, 'groupname');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A35C8149-DA12-4B7B-BED3-0E913E398990}{tr:id=name}{td}h6.canDelete{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canDelete{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_des|text=|trigger=button}{sub-section}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_des|trigger=none|class=sIndent}Returns a boolean value for security rights.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_prs|trigger=none}serverName -- the servername
tableName -- the tablename
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_ret|text=|trigger=button}{sub-section}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_ret|trigger=none|class=sIndent}[Boolean] -- true if allowed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_see|text=|trigger=button}{sub-section}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_see|text=|trigger=button}{sub-section}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_sam|text=|trigger=button}{sub-section}{sub-section:A35C8149-DA12-4B7B-BED3-0E913E398990_sam|class=sIndent|trigger=none}{code:language=javascript}
var canRead = security.canRead(controller.getServerName(),controller.getTableName())
var canInsert = security.canInsert(controller.getServerName(),controller.getTableName())
var canUpdate = security.canUpdate(controller.getServerName(),controller.getTableName())
var canDelete = security.canDelete(controller.getServerName(),controller.getTableName())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EE7579A8-D961-4F4E-8AD6-450E62475798}{tr:id=name}{td}h6.canInsert{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canInsert{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_des|text=|trigger=button}{sub-section}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_des|trigger=none|class=sIndent}Returns a boolean value for security rights.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_prs|trigger=none}serverName -- the servername
tableName -- the tablename
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_ret|text=|trigger=button}{sub-section}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_ret|trigger=none|class=sIndent}[Boolean] -- true if allowed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_see|text=|trigger=button}{sub-section}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_see|text=|trigger=button}{sub-section}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_sam|text=|trigger=button}{sub-section}{sub-section:EE7579A8-D961-4F4E-8AD6-450E62475798_sam|class=sIndent|trigger=none}{code:language=javascript}
var canRead = security.canRead(controller.getServerName(),controller.getTableName())
var canInsert = security.canInsert(controller.getServerName(),controller.getTableName())
var canUpdate = security.canUpdate(controller.getServerName(),controller.getTableName())
var canDelete = security.canDelete(controller.getServerName(),controller.getTableName())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=09725CDC-4F00-47E1-8C71-9526E5B353F6}{tr:id=name}{td}h6.canRead{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canRead{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_des|text=|trigger=button}{sub-section}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_des|trigger=none|class=sIndent}Returns a boolean value for security rights.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_prs|trigger=none}serverName -- the servername
tableName -- the tablename
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_ret|text=|trigger=button}{sub-section}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_ret|trigger=none|class=sIndent}[Boolean] -- true if allowed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_see|text=|trigger=button}{sub-section}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_see|text=|trigger=button}{sub-section}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_sam|text=|trigger=button}{sub-section}{sub-section:09725CDC-4F00-47E1-8C71-9526E5B353F6_sam|class=sIndent|trigger=none}{code:language=javascript}
var canRead = security.canRead(controller.getServerName(),controller.getTableName())
var canInsert = security.canInsert(controller.getServerName(),controller.getTableName())
var canUpdate = security.canUpdate(controller.getServerName(),controller.getTableName())
var canDelete = security.canDelete(controller.getServerName(),controller.getTableName())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=9EF11CE0-AF73-4391-B7B5-1DCC909EBF50}{tr:id=name}{td}h6.canUpdate{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}canUpdate{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_des|text=|trigger=button}{sub-section}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_des|trigger=none|class=sIndent}Returns a boolean value for security rights.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_prs|trigger=none}serverName -- the servername
tableName -- the tablename
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_ret|text=|trigger=button}{sub-section}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_ret|trigger=none|class=sIndent}[Boolean] -- true if allowed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_see|text=|trigger=button}{sub-section}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_see|text=|trigger=button}{sub-section}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_sam|text=|trigger=button}{sub-section}{sub-section:9EF11CE0-AF73-4391-B7B5-1DCC909EBF50_sam|class=sIndent|trigger=none}{code:language=javascript}
var canRead = security.canRead(controller.getServerName(),controller.getTableName())
var canInsert = security.canInsert(controller.getServerName(),controller.getTableName())
var canUpdate = security.canUpdate(controller.getServerName(),controller.getTableName())
var canDelete = security.canDelete(controller.getServerName(),controller.getTableName())
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EC50C4D5-8ED4-4208-BFA6-E782C2AF8294}{tr:id=name}{td}h6.changeGroupName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}changeGroupName{span}{span:id=iets|style=float: left;}\(oldGroupName, newGroupName){span}{td}{tr}{tr:id=des}{td}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_des|text=|trigger=button}{sub-section}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_des|trigger=none|class=sIndent}Changes the groupname of a group.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_prs|trigger=none}oldGroupName -- the old name
newGroupName -- the new name
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_ret|text=|trigger=button}{sub-section}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_ret|trigger=none|class=sIndent}[Boolean] -- true if changed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_see|text=|trigger=button}{sub-section}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_see|text=|trigger=button}{sub-section}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_sam|text=|trigger=button}{sub-section}{sub-section:EC50C4D5-8ED4-4208-BFA6-E782C2AF8294_sam|class=sIndent|trigger=none}{code:language=javascript}
security.changeGroupName('oldGroup', 'newGroup');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2075F944-BAB2-41D3-89B1-69FD3179ABC7}{tr:id=name}{td}h6.changeUserName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}changeUserName{span}{span:id=iets|style=float: left;}\(a_userUID, username){span}{td}{tr}{tr:id=des}{td}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_des|text=|trigger=button}{sub-section}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_des|trigger=none|class=sIndent}Changes the username of the specified userUID.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_prs|trigger=none}a_userUID -- the userUID to work on
username -- the new username
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_ret|text=|trigger=button}{sub-section}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_ret|trigger=none|class=sIndent}[Boolean] -- true if changed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_see|text=|trigger=button}{sub-section}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_see|text=|trigger=button}{sub-section}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_sam|text=|trigger=button}{sub-section}{sub-section:2075F944-BAB2-41D3-89B1-69FD3179ABC7_sam|class=sIndent|trigger=none}{code:language=javascript}
if(security.changeUserName(security.getUserUID('name1'), 'name2'))
{
	application.output('Username changed');
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=69261D8C-CB70-415C-88A2-9FFB030BD8E4}{tr:id=name}{td}h6.checkPassword{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}checkPassword{span}{span:id=iets|style=float: left;}\(a_userUID, password){span}{td}{tr}{tr:id=des}{td}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_des|text=|trigger=button}{sub-section}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_des|trigger=none|class=sIndent}Returns true if the password for that userUID is correct, else false.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_prs|trigger=none}a_userUID -- the userUID to check the password for
password -- the new password
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_ret|text=|trigger=button}{sub-section}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_ret|trigger=none|class=sIndent}[Boolean] -- true if password oke{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_see|text=|trigger=button}{sub-section}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_see|text=|trigger=button}{sub-section}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_sam|text=|trigger=button}{sub-section}{sub-section:69261D8C-CB70-415C-88A2-9FFB030BD8E4_sam|class=sIndent|trigger=none}{code:language=javascript}
if(security.checkPassword(security.getUserUID(), 'password1'))
{
	security.setPassword(security.getUserUID(), 'password2')
}
else
{
	application.output('wrong password')
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669}{tr:id=name}{td}h6.createGroup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}createGroup{span}{span:id=iets|style=float: left;}\(groupName){span}{td}{tr}{tr:id=des}{td}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_des|text=|trigger=button}{sub-section}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_des|trigger=none|class=sIndent}Creates a group, returns the groupname (or null when group couldn't be created).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_prs|trigger=none}groupName -- the group name to create
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_ret|text=|trigger=button}{sub-section}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_ret|trigger=none|class=sIndent}[String] -- the created groupname{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_see|text=|trigger=button}{sub-section}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_see|text=|trigger=button}{sub-section}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_sam|text=|trigger=button}{sub-section}{sub-section:C0C98ADB-F6D8-4989-AB0C-59ADD9D6A669_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BBC25AC5-90D9-4B96-8653-702AC5F11D0A}{tr:id=name}{td}h6.createUser{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}Object{span}{span:id=iets|style=float: left; font-weight: bold;}createUser{span}{span:id=iets|style=float: left;}\(username, password, userUID){span}{td}{tr}{tr:id=des}{td}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_des|text=|trigger=button}{sub-section}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_des|trigger=none|class=sIndent}Creates a new user, returns new uid (or null when group couldn't be created or user alreay exist).{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_prs|trigger=none}username -- the username
password -- the user password
\[userUID\] -- the userUID to use
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_ret|text=|trigger=button}{sub-section}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_ret|trigger=none|class=sIndent}Object -- the userUID the created userUID, will be same if provided{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_see|text=|trigger=button}{sub-section}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_see|text=|trigger=button}{sub-section}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_sam|text=|trigger=button}{sub-section}{sub-section:BBC25AC5-90D9-4B96-8653-702AC5F11D0A_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=00964F63-791F-4CA8-85CB-73922999D48E}{tr:id=name}{td}h6.deleteGroup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}deleteGroup{span}{span:id=iets|style=float: left;}\(groupName){span}{td}{tr}{tr:id=des}{td}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_des|text=|trigger=button}{sub-section}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_des|trigger=none|class=sIndent}Deletes a group, returns true if no error was reported.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_prs|trigger=none}groupName -- the name of the group to delete
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_ret|text=|trigger=button}{sub-section}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_ret|trigger=none|class=sIndent}[Boolean] -- true if deleted{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_see|text=|trigger=button}{sub-section}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_see|text=|trigger=button}{sub-section}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_sam|text=|trigger=button}{sub-section}{sub-section:00964F63-791F-4CA8-85CB-73922999D48E_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7}{tr:id=name}{td}h6.deleteUser{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}deleteUser{span}{span:id=iets|style=float: left;}\(userUID){span}{td}{tr}{tr:id=des}{td}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_des|text=|trigger=button}{sub-section}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_des|trigger=none|class=sIndent}Deletes an user. returns true if no error was reported.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_prs|trigger=none}userUID -- The UID of the user to be deleted.
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_ret|text=|trigger=button}{sub-section}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_ret|trigger=none|class=sIndent}[Boolean] -- true if the user is successfully deleted.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_see|text=|trigger=button}{sub-section}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_see|text=|trigger=button}{sub-section}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_sam|text=|trigger=button}{sub-section}{sub-section:7D295996-EF78-4CE0-A9C0-7D2E5F8F2AD7_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=63BEA6E7-5CD9-4B19-8965-B3588B5D98BC}{tr:id=name}{td}h6.getClientID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getClientID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_des|text=|trigger=button}{sub-section}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_des|trigger=none|class=sIndent}Returns the client ID.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_ret|text=|trigger=button}{sub-section}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_ret|trigger=none|class=sIndent}[String] -- the clientId as seen on the server admin page{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_see|text=|trigger=button}{sub-section}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_see|text=|trigger=button}{sub-section}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_sam|text=|trigger=button}{sub-section}{sub-section:63BEA6E7-5CD9-4B19-8965-B3588B5D98BC_sam|class=sIndent|trigger=none}{code:language=javascript}
var clientId = security.getClientID()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A18FF502-5AD8-4CEC-9037-A5260CA43C5A}{tr:id=name}{td}h6.getElementUUIDs{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getElementUUIDs{span}{span:id=iets|style=float: left;}\(formname){span}{td}{tr}{tr:id=des}{td}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_des|text=|trigger=button}{sub-section}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_des|trigger=none|class=sIndent}Returns the form elements UUID's as dataset, the one with no name is the form itself.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_prs|trigger=none}formname -- the formname to retieve the dataset for
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_ret|text=|trigger=button}{sub-section}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_ret|trigger=none|class=sIndent}[JSDataSet] -- dataset with element info{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_see|text=|trigger=button}{sub-section}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_see|text=|trigger=button}{sub-section}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_sam|text=|trigger=button}{sub-section}{sub-section:A18FF502-5AD8-4CEC-9037-A5260CA43C5A_sam|class=sIndent|trigger=none}{code:language=javascript}
var formElementsUUIDDataSet = security.getElementUUIDs('orders_form');
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=94FAFFC7-7887-44CE-A6C5-8DD24A9B488C}{tr:id=name}{td}h6.getGroups{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getGroups{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_des|text=|trigger=button}{sub-section}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_des|trigger=none|class=sIndent}Get all the groups (returns a dataset).
first id column is depricated!, use only the group name column.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_ret|text=|trigger=button}{sub-section}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_ret|trigger=none|class=sIndent}[JSDataSet] -- dataset with all the groups{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_see|text=|trigger=button}{sub-section}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_see|text=|trigger=button}{sub-section}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_sam|text=|trigger=button}{sub-section}{sub-section:94FAFFC7-7887-44CE-A6C5-8DD24A9B488C_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=670BA324-46C3-432A-80DE-4A4D8F756EAA}{tr:id=name}{td}h6.getSystemUserName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSystemUserName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_des|text=|trigger=button}{sub-section}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_des|trigger=none|class=sIndent}Retrieves the username of the currently logged in user on operating system level.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_ret|text=|trigger=button}{sub-section}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_ret|trigger=none|class=sIndent}[String] -- the os user name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_see|text=|trigger=button}{sub-section}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_see|text=|trigger=button}{sub-section}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_sam|text=|trigger=button}{sub-section}{sub-section:670BA324-46C3-432A-80DE-4A4D8F756EAA_sam|class=sIndent|trigger=none}{code:language=javascript}
//gets the current os username
var osUserName = security.getSystemUserName();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1087E1BC-6837-48EF-8F14-7469270D49EA}{tr:id=name}{td}h6.getUserGroups{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getUserGroups{span}{span:id=iets|style=float: left;}\(userUID){span}{td}{tr}{tr:id=des}{td}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_des|text=|trigger=button}{sub-section}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_des|trigger=none|class=sIndent}Get all the groups of the current user, finds the goups for given user UID if passed as parameter.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_prs|trigger=none}\[userUID\] -- to retrieve the user groups
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_ret|text=|trigger=button}{sub-section}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_ret|trigger=none|class=sIndent}[JSDataSet] -- dataset with groupnames{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_see|text=|trigger=button}{sub-section}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_see|text=|trigger=button}{sub-section}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_sam|text=|trigger=button}{sub-section}{sub-section:1087E1BC-6837-48EF-8F14-7469270D49EA_sam|class=sIndent|trigger=none}{code:language=javascript}
//get all the users in the security settings (Returns a JSDataset)
var dsUsers = security.getUsers()

//loop through each user to get their group
//The getValue call is (row,column) where column 1 == id and 2 == name
for(var i=1 ; i<=dsUsers.getMaxRowIndex() ; i++)
{
	//print to the output debugger tab: "user: " and the username
	application.output("user:" + dsUsers.getValue(i,2));

	//set p to the user group for the current user
	var p = security.getUserGroups(dsUsers.getValue(i,1));

	for(k=1;k<=p.getMaxRowIndex();k++)
	{
		//print to the output debugger tab: "group" and the group(s)
		//the user belongs to
		application.output("group: " + p.getValue(k,2));
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA}{tr:id=name}{td}h6.getUserName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getUserName{span}{span:id=iets|style=float: left;}\(userUID){span}{td}{tr}{tr:id=des}{td}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_des|text=|trigger=button}{sub-section}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_des|trigger=none|class=sIndent}Get the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_prs|trigger=none}\[userUID\] -- to retrieve the name
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_ret|text=|trigger=button}{sub-section}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_ret|trigger=none|class=sIndent}[String] -- the user name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_see|text=|trigger=button}{sub-section}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_see|text=|trigger=button}{sub-section}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_sam|text=|trigger=button}{sub-section}{sub-section:CB9C3CAC-2C69-411B-B526-BC6F99D2E5EA_sam|class=sIndent|trigger=none}{code:language=javascript}
//gets the current loggedIn username
var userName = security.getUserName();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=7559A6B2-8925-4974-A37F-6AEB4DE762FC}{tr:id=name}{td}h6.getUserUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getUserUID{span}{span:id=iets|style=float: left;}\(username){span}{td}{tr}{tr:id=des}{td}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_des|text=|trigger=button}{sub-section}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_des|trigger=none|class=sIndent}Get the current user UID (null if not logged in), finds the userUID for given user_name if passed as parameter.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_prs|trigger=none}\[username\] -- the username to find the userUID for
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_ret|text=|trigger=button}{sub-section}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_ret|trigger=none|class=sIndent}[String] -- the userUID{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_see|text=|trigger=button}{sub-section}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_see|text=|trigger=button}{sub-section}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_sam|text=|trigger=button}{sub-section}{sub-section:7559A6B2-8925-4974-A37F-6AEB4DE762FC_sam|class=sIndent|trigger=none}{code:language=javascript}
//gets the current loggedIn username
var userName = security.getUserName(); 
//gets the uid of the given username
var userUID = security.getUserUID(userName);
//is the same as above 
//var my_userUID = security.getUserUID();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BD2B7B2B-B855-4292-AF41-C43BE2056C2A}{tr:id=name}{td}h6.getUsers{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}getUsers{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_des|text=|trigger=button}{sub-section}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_des|trigger=none|class=sIndent}Get all the users in the security settings (returns a dataset).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_ret|text=|trigger=button}{sub-section}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_ret|trigger=none|class=sIndent}[JSDataSet] -- dataset with all the users{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_see|text=|trigger=button}{sub-section}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_see|text=|trigger=button}{sub-section}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_sam|text=|trigger=button}{sub-section}{sub-section:BD2B7B2B-B855-4292-AF41-C43BE2056C2A_sam|class=sIndent|trigger=none}{code:language=javascript}
//get all the users in the security settings (Returns a JSDataset)
var dsUsers = security.getUsers()

//loop through each user to get their group
//The getValue call is (row,column) where column 1 == id and 2 == name
for(var i=1 ; i<=dsUsers.getMaxRowIndex() ; i++)
{
	//print to the output debugger tab: "user: " and the username
	application.output("user:" + dsUsers.getValue(i,2));

	//set p to the user group for the current user
	var p = security.getUserGroups(dsUsers.getValue(i,1));

	for(k=1;k<=p.getMaxRowIndex();k++)
	{
		//print to the output debugger tab: "group" and the group(s)
		//the user belongs to
		application.output("group: " + p.getValue(k,2));
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA}{tr:id=name}{td}h6.login{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}login{span}{span:id=iets|style=float: left;}\(display_username, a_userUID, groups){span}{td}{tr}{tr:id=des}{td}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_des|text=|trigger=button}{sub-section}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_des|trigger=none|class=sIndent}Login to be able to leave the solution loginForm.

Example: Group names may be received from LDAP (Lightweight Directory Access Protocol) - a standard protocol used in web browsers and email applications to enable lookup queries that access a directory listing.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_prs|trigger=none}display_username -- the user display name, like 'James Webb'
a_userUID -- the user UID to process login for
groups -- the groups array
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_ret|text=|trigger=button}{sub-section}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_ret|trigger=none|class=sIndent}[Boolean] -- true if loggedin{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_see|text=|trigger=button}{sub-section}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_see|text=|trigger=button}{sub-section}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_sam|text=|trigger=button}{sub-section}{sub-section:F1DA3329-32AE-45D4-AC7E-4A4A557CCCFA_sam|class=sIndent|trigger=none}{code:language=javascript}
var groups = new Array()
groups[0] = 'Administrators'; //normally these groups are for example received from LDAP
var user_uid = globals.email; //also this uid might be received from external authentication method
var ok =  security.login(globals.username, user_uid , groups)
if (!ok)
{
	plugins.dialogs.showErrorDialog('Login failure',  'Already logged in? or no user_uid/groups specified?', 'OK')
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=BC6730D7-5AE5-4EE9-B356-98DA39379D79}{tr:id=name}{td}h6.logout{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}logout{span}{span:id=iets|style=float: left;}\(solutionToLoad, method, argument){span}{td}{tr}{tr:id=des}{td}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_des|text=|trigger=button}{sub-section}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_des|trigger=none|class=sIndent}Logout the current user.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_prs|trigger=none}\[solutionToLoad\] -- the solution to load after logout
\[method\] -- the method to run in the solution to load
\[argument\] -- the argument to pass to the method to run
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_ret|text=|trigger=button}{sub-section}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_see|text=|trigger=button}{sub-section}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_see|text=|trigger=button}{sub-section}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_sam|text=|trigger=button}{sub-section}{sub-section:BC6730D7-5AE5-4EE9-B356-98DA39379D79_sam|class=sIndent|trigger=none}{code:language=javascript}
var groups = new Array();
	groups[0] = 'testgroup';
	var ok =  security.login('user1', security.getUserUID('user1') , groups)
	if (!ok) 
	{
		plugins.dialogs.showErrorDialog('Login failure',  'Already logged in? or no user_uid/groups specified?', 'OK')
 	}
	else 
	{ 
 		plugins.dialogs.showInfoDialog('Logged in','Logged in','OK') 
	} 
	security.logout();
	//security.logout('solution_name');//log out and open solution 'solution_name'
	//security.logout('solution_name','global_method_name','my_argument');//log out, open solution 'solution_name', call global method 'global_method_name' with argument 'my_argument'
	//note: specifying a solution will not work in developer due to debugger dependencies
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=590E300A-AB93-415E-97A5-11B2F610FD3F}{tr:id=name}{td}h6.removeUserFromGroup{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}removeUserFromGroup{span}{span:id=iets|style=float: left;}\(a_userUID, groupName){span}{td}{tr}{tr:id=des}{td}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_des|text=|trigger=button}{sub-section}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_des|trigger=none|class=sIndent}Removes an user from a group.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_prs|trigger=none}a_userUID -- the user UID to be removed
groupName -- the group to remove from
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_ret|text=|trigger=button}{sub-section}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_ret|trigger=none|class=sIndent}[Boolean] -- true if removed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_see|text=|trigger=button}{sub-section}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_see|text=|trigger=button}{sub-section}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_sam|text=|trigger=button}{sub-section}{sub-section:590E300A-AB93-415E-97A5-11B2F610FD3F_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=B35421C6-E512-42DA-9066-A408DD814D81}{tr:id=name}{td}h6.setPassword{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setPassword{span}{span:id=iets|style=float: left;}\(a_userUID, password){span}{td}{tr}{tr:id=des}{td}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_des|text=|trigger=button}{sub-section}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_des|trigger=none|class=sIndent}Set a new password for the given userUID.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_prs|trigger=none}a_userUID -- the userUID to set the new password for
password -- the new password
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_ret|text=|trigger=button}{sub-section}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_ret|trigger=none|class=sIndent}[Boolean] -- true if changed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_see|text=|trigger=button}{sub-section}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_see|text=|trigger=button}{sub-section}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_sam|text=|trigger=button}{sub-section}{sub-section:B35421C6-E512-42DA-9066-A408DD814D81_sam|class=sIndent|trigger=none}{code:language=javascript}
if(security.checkPassword(security.getUserUID(), 'password1'))
{
	security.setPassword(security.getUserUID(), 'password2')
}
else
{
	application.output('wrong password')
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=1A100916-647E-48B0-A3A4-1351CCD4F01D}{tr:id=name}{td}h6.setSecuritySettings{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setSecuritySettings{span}{span:id=iets|style=float: left;}\(dataset){span}{td}{tr}{tr:id=des}{td}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_des|text=|trigger=button}{sub-section}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_des|trigger=none|class=sIndent}Sets the security settings; the entries contained in the given dataset will override those contained in the current security settings.

NOTE: The security.getElementUUIDs and security.setSecuritySettings functions can be used to define custom security that overrides Servoy security. 
For additional information see the function security.getElementUUIDs.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_prs|trigger=none}dataset -- the dataset with security settings
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_ret|text=|trigger=button}{sub-section}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_see|text=|trigger=button}{sub-section}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_see|text=|trigger=button}{sub-section}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_sam|text=|trigger=button}{sub-section}{sub-section:1A100916-647E-48B0-A3A4-1351CCD4F01D_sam|class=sIndent|trigger=none}{code:language=javascript}
var colNames = new Array();
colNames[0] = 'uuid';
colNames[1] = 'flags';
var dataset = databaseManager.createEmptyDataSet(0,colNames);

var row = new Array();
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb';//normally retreived via security.getElementUUIDs(...)
row[1] = JSSecurity.VIEWABLE|JSSecurity.ACCESSIBLE; // use bitwise 'or' for both
dataset.addRow(row);//setting element security

row = new Array();
row[0] = 'example_data.orders';
row[1] = JSSecurity.READ|JSSecurity.INSERT|JSSecurity.UPDATE|JSSecurity.DELETE|JSSecurity.TRACKING; //use bitwise 'or' for multiple flags
dataset.addRow(row);//setting table security

security.setSecuritySettings(dataset);//to be called in solution startup method
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8}{tr:id=name}{td}h6.setUserUID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}setUserUID{span}{span:id=iets|style=float: left;}\(a_userUID, newUserUID){span}{td}{tr}{tr:id=des}{td}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_des|text=|trigger=button}{sub-section}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_des|trigger=none|class=sIndent}Set a new userUID for the given userUID.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_prs|trigger=none}a_userUID -- the userUID to set the new user UID for
newUserUID -- the new user UID
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_ret|text=|trigger=button}{sub-section}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_ret|trigger=none|class=sIndent}[Boolean] -- true if changed{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_see|text=|trigger=button}{sub-section}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_see|text=|trigger=button}{sub-section}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_sam|text=|trigger=button}{sub-section}{sub-section:428A0D6B-F6E4-4ACE-AE4D-83D87E5396A8_sam|class=sIndent|trigger=none}{code:language=javascript}
var removeUser = true;
//create a user
var uid = security.createUser('myusername', 'mypassword');
if (uid) //test if user was created
{
	// Get all the groups
	var set = security.getGroups();
	for(var p = 1 ; p <= set.getMaxRowIndex() ; p++)
	{
		// output name of the group
		application.output(set.getValue(p, 2));
		// add user to group
		security.addUserToGroup(uid, set.getValue(p,2));
	}
	// if not remove user, remove user from all the groups
	if(!removeUser)
	{
		// get now all the groups that that users has (all if above did go well)
		var set =security.getUserGroups(uid);
		for(var p = 1;p<=set.getMaxRowIndex();p++)
		{
			// output name of the group
			application.output(set.getValue(p, 2));
			// remove the user from the group
			security.removeUserFromGroup(uid, set.getValue(p,2));
		}
	}
	else
	{
		// delete the user (the user will be removed from the groups)
		security.deleteUser(uid);
	}
}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}