sWordListBLOCKsWordListBLOCKservoy sReturnTypes2100%height: 30px;2servoy sReturnTypes2100%height: 30px;2Return TypesSupported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Constants SummaryConstant representing the accessible flag for form security.Constant representing the delete flag for table security.Constant representing the insert flag for table security.Constant representing the read flag for table security.Constant representing the tracking flag for table security (tracks sql insert/update/delete).Constant representing the tracking flag for table security (tracks sql select).Constant representing the update flag for table security.Constant representing the viewable flag for form security.servoy sSummary12%30%58%height: 30px;3Methods SummaryAdds an user to a named group.Authenticate the given credentials against the mobile service solution.Authenticate to the Servoy Server using one of the installed authenticators or the Servoy default authenticator.Authenticate to the Servoy Server using one of the installed authenticators or the Servoy default authenticator.Returns whether form is accessible.Returns whether element from form is accessible.Returns a boolean value for security rights.Returns a boolean value for security rights.Returns a boolean value for security rights.Returns a boolean value for security rights.Returns whether form is viewable.Returns whether element from form is viewable.Changes the groupname of a group.Changes the username of the specified userUID.Returns true if the password for that userUID is correct, else false.Creates a group, returns the groupname (or null when group couldn't be created).Creates a new user, returns new uid (or null when group couldn't be created or user alreay exist).Creates a new user, returns new uid (or null when group couldn't be created or user alreay exist).Deletes a group, returns true if no error was reported.Deletes an user.Returns the client ID.Returns the form elements UUID's as dataset, the one with no name is the form itself.Get all the groups (returns a dataset).Retrieves the username of the currently logged in user on operating system level.Retrieve the tenant value for this Client, this value will be used as the value for all tables that have a column marked as a tenant column.Get all the groups of the current user.Get all the groups for given user UID.Get the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.Get the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.Get the current user UID (null if not logged in); finds the userUID for given user_name if passed as parameter.Get the current user UID (null if not logged in); finds the userUID for given user_name if passed as parameter.Get all the users in the security settings (returns a dataset).Get all the users in the security settings (returns a dataset).Check whatever the current user is part of the specified groupCheck whatever the user specified as parameter is part of the specified group.Login to be able to leave the solution loginForm.voidLogout the current user and close the solution, if the solution requires authentication and user is logged in.voidLogout the current user and close the solution, if the solution requires authentication and user is logged in.voidLogout the current user and close the solution, if the solution requires authentication and user is logged in.voidLogout the current user and close the solution, if the solution requires authentication and user is logged in.voidLogout the current user and close the solution, if the solution requires authentication and user is logged in.Removes an user from a group.Set a new password for the given userUID.voidSets the security settings; the entries contained in the given dataset will override those contained in the current security settings.voidSet the tenant value for this Client, this value will be used as the value for all tables that have a column marked as a tenant column.Set a new userUID for the given userUID.constantservoy sDetail2100%height:30px2Constants DetailsACCESSIBLEname
sIndentcredentialsarray whose elements are passed as arguments to the authenticator method, in case of servoy built-in authentication this should be [username, password]ret
Returns
sIndentauthentication result from authenticator solution or boolean in case of servoy built-in authenticationclients
sIndentauthenticator_solutionauthenticator solution installed on the Servoy Server, null for servoy built-in authenticationmethodauthenticator method, null for servoy built-in authenticationret
Returns
sIndentauthentication result from authenticator solution or boolean in case of servoy built-in authenticationclients
sIndentauthenticator_solutionauthenticator solution installed on the Servoy Server, null for servoy built-in authenticationmethodauthenticator method, null for servoy built-in authenticationcredentialsarray whose elements are passed as arguments to the authenticator method, in case of servoy built-in authentication this should be [username, password]ret
Returns
sIndentauthentication result from authenticator solution or boolean in case of servoy built-in authenticationclients
dessIndentChanges the username of the specified userUID. Note: this method can only be called by an admin user or a normal logged in user changing its own userName.
Returns a boolean value for security rights.
prs
Parameters
sIndenta_userUIDthe userUID to work onusernamethe new usernamecheckPasswordnamecheckPassword(a_userUID, passworddataSourcethe datasourceret
Returns
sIndenttrue if allowedclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow canViewname
canView(formName)
dessIndentReturns true if the password for that userUID is correct, else false.
Returns whether form is viewable.
security.canView(formName)
prs
Parameters
sIndenta_userUIDthe userUID to check the password forpasswordthe new passwordcreateGroupformNameform nameret
dessIndentCreates a new user, returns new uid (or null when group couldn't be created or user alreay exist). Note: this method can only be called by an admin.
Changes the groupname of a group.
Note: this method can only be called by an admin.
prs
Parameters
sIndentusernamethe usernamepasswordthe user passwordcreateUseroldGroupNamethe old namenewGroupNamethe new nameret
username, password, userUID)dessIndentCreates a new user, returns new uid (or null when group couldn't be created or user alreay exist). Note: this method can only be called by an admin.prs
Parameters
sIndentusernamethe usernamepasswordthe user passworduserUIDthe user UID to useret
Returns
sIndentdeleteGroup
a_userUID, username)
dessIndent
Changes the username of the specified userUID.
Note: this method can only be called by an admin user or a normal logged in user changing its own userName.
prs
Parameters
sIndenta_userUIDthe userUID to work onusernamethe new usernameret
dessIndentCheck whatever the user specified as parameter is part of the specified group.prs
Parameters
sIndentgroupNamename of the group to checkuserUIDUID of the user to checkret
Returns
sIndent
getTenantValue()
dessIndentGet all the users in the security settings (returns a dataset).login
Retrieve the tenant value for this Client, this value will be used as the value for all tables that have a column marked as a tenant column.
This results in adding a table filter for that table based on that column and the this value.
<p>
A client with tenant value will only receive databroadcasts from other clients that have no or a common tenant value set
Be sure to not access or depend on records having different tenant values, as no databroadcasts will be received for those
</p>
ret
Returns
sIndent An array of tenant values for this client.clients
sIndentusernamethe username, like 'JamesWebb'a_userUIDthe user UID to process login forgroupsthe groups arrayret
Returns
sIndent
getUserGroups()
dessIndentLogin 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.logout
user and close the solution, if the solution requires authentication and user is logged in. You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client). An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().logout
user name (null if not logged in), finds the user name for given user UID if passed as parameter.
user and close the solution, if the solution requires authentication and user is logged in. You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client). An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
user name (null if not logged in), finds the user name for given user UID if passed as parameter.
prs
Parameters
sIndentsolutionToLoaduserUIDthe solution to load after logoutlogoutuser UID used to retrieve the nameret
user and close the solution, if the solution requires authentication and user is logged in. You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client). An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().prs
Parameters
sIndentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to loadret
Returns
sIndentlogout
user UID (null if not logged in); finds the userUID for given user_name if passed as parameter.
ret
Returns
sIndent the userUIDclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetUserUIDname
getUserUID(username)
dessIndent
Get the current user UID (null if not logged in); finds the userUID for given user_name if passed as parameter.
prs
Parameters
sIndentusernamethe username to find the userUID forret
solutionToLoad, method, argumentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to loadargumentthe argument to pass to the method to runret
Returns
sIndent
)
dessIndentLogout the current user and close the solution, if the solution requires authentication and user is logged in. You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client). An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().prs
Parameters
sIndentremoveUserFromGroupname
removeUserFromGroup(a_userUID, groupName)
dessIndentRemoves an user from a group. Note: this method can only be called by an admin.prs
Parameters
sIndenta_userUIDthe user UID to be removedgroupNamethe group to remove fromret
dessIndentSet a new password for the given userUID. Note: this method can only be called by an admin user or a normal logged in user changing its own password.prs
Parameters
sIndenta_userUIDthe userUID to set the new password forpasswordthe new passwordret
dessIndentSets 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.prs
Parameters
sIndentdatasetthe dataset with security settingsret
Returns
sIndent
Get all the users in the security settings (returns a dataset).
ret
Returns
sIndent dataset with all the usersclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow getUsersname
getUsers(groupName)
dessIndent
Get all the users in the security settings (returns a dataset).
Check whatever the user specified as parameter is part of the specified group.
prs
Parameters
sIndentgroupNamename of the group to checkuserUIDUID of the user to checkret
Returns
sIndent dataset with groupnamesclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowloginname
login(username, a_userUID, groups)
dessIndent
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.
prs
Parameters
sIndentusernamethe username, like 'JamesWebb'a_userUIDthe user UID to process login forgroupsthe groups arrayret
Returns
sIndent true if loggedinclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowlogoutname
logout()
dessIndent
Logout the current user and close the solution, if the solution requires authentication and user is logged in.
You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client).
An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
Logout the current user and close the solution, if the solution requires authentication and user is logged in.
You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client).
An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
prs
Parameters
sIndentsolutionToLoadthe solution to load after logoutclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowlogoutname
logout(solutionToLoad, argument)
dessIndent
Logout the current user and close the solution, if the solution requires authentication and user is logged in.
You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client).
An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
prs
Parameters
sIndentsolutionToLoadthe solution to load after logoutargumentthe argument to pass to the (login) solution onOpenclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowlogoutname
logout(solutionToLoad, method)
dessIndent
Logout the current user and close the solution, if the solution requires authentication and user is logged in.
You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client).
An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
prs
Parameters
sIndentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to loadclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowlogoutname
logout(solutionToLoad, method, argument)
dessIndent
Logout the current user and close the solution, if the solution requires authentication and user is logged in.
You can redirect to another solution if needed; if you want to go to a different url, you need to call application.showURL(url) before calling security.logout() (this is only applicable for Web Client).
An alternative option to close a solution and to open another solution, while keeping the user logged in, is application.closeSolution().
prs
Parameters
sIndentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to loadargumentthe argument to pass to the method to runclients
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.
prs
Parameters
sIndentdatasetthe dataset with security settingsclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowsetTenantValuename
setTenantValue(value)
dessIndent
Set the tenant value for this Client, this value will be used as the value for all tables that have a column marked as a tenant column.
This results in adding a table filter for that table based on that column and the this value.
<p>
This value will be auto filled in for all the columns that are marked as a tenant column. If you give an array of values then the first array value is used for this.
</p>
<p>
When a tenant value is set the client will only receive databroadcasts from other clients that have no or a common tenant value set
Be sure to not access or depend on records having different tenant values, as no databroadcasts will be received for those
</p>
prs
Parameters
sIndentvaluea single tenant value or an array of tenant values to filter tables having a column flagged as Tenant column by.clients