Child pages
  • Security

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

sWordListBLOCKsWordListBLOCK

servoy sReturnTypes2100%height: 30px;2servoy sReturnTypes2100%height: 30px;2Return TypesSupported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy 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 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.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.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.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.Set a new userUID for the given userUID.

constantservoy sDetail2100%height:30px2Constants DetailsACCESSIBLEname

ACCESSIBLE

dessIndentConstant representing the accessible flag for form security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow DELETEname

DELETE

dessIndentConstant representing the delete flag for table security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
INSERTname

INSERT

dessIndentConstant representing the insert flag for table security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
READname

READ

dessIndentConstant representing the read flag for table security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
TRACKINGname

TRACKING

dessIndentConstant representing the tracking flag for table security (tracks sql insert/update/delete).ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
TRACKING_VIEWSname

TRACKING_VIEWS

dessIndentConstant representing the tracking flag for table security (tracks sql select).ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
UPDATEname

UPDATE

dessIndentConstant representing the update flag for table security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
VIEWABLEname

VIEWABLE

dessIndentConstant representing the viewable flag for form security.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 

functionservoy sDetail2100%height:30px2Methods DetailsaddUserToGroupname

addUserToGroup(a_userUID, groupName)

dessIndentAdds an user to a named group. Note: this method can only be called by an admin.prs

Parameters

sIndenta_userUIDthe user UID to be addedgroupNamethe group to add to
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow authenticatename

authenticate(credentials)

dessIndentAuthenticate the given credentials against the mobile service solution. It will set the credentials and then do a sync call to the server.prs

Parameters

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

sIndent
clients

Supported Clients

sIndentNGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
authenticatename

authenticate(authenticator_solution, method)

dessIndentAuthenticate to the Servoy Server using one of the installed authenticators or the Servoy default authenticator. Note: this method should be called from a login solution.prs

Parameters

sIndentauthenticator_solutionauthenticator solution installed on the Servoy Server, null for servoy built-in authenticationmethodauthenticator method, null for servoy built-in authentication
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
authenticatename

authenticate(authenticator_solution, method, credentials)

dessIndentAuthenticate to the Servoy Server using one of the installed authenticators or the Servoy default authenticator. Note: this method should be called from a login solution, once logged in, the authenticate method has no effect.prs

Parameters

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

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
canDeletename

canDelete(dataSource)

dessIndentReturns a boolean value for security rights.prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
canInsertname

canInsert(dataSource)

dessIndentReturns a boolean value for security rights.prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
canReadname

canRead(dataSource)

dessIndentReturns a boolean value for security rights.prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
canUpdatename

canUpdate(dataSource)

dessIndentReturns a boolean value for security rights.prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
changeGroupNamename

changeGroupName(oldGroupName, newGroupName)

dessIndentChanges the groupname of a group. Note: this method can only be called by an admin.prs

Parameters

sIndentoldGroupNamethe old namenewGroupNamethe new name
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
changeUserNamename

changeUserName(a_userUID, username)

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.prs

Parameters

sIndenta_userUIDthe userUID to work onusernamethe new username
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
checkPasswordname

checkPassword(a_userUID, password)

dessIndentReturns true if the password for that userUID is correct, else false.prs

Parameters

sIndenta_userUIDthe userUID to check the password forpasswordthe new password
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
createGroupname

createGroup(groupName)

dessIndentCreates a group, returns the groupname (or null when group couldn't be created). Note: this method can only be called by an admin.prs

Parameters

sIndentgroupNamethe group name to create
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
createUsername

createUser(username, password)

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 password
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
createUsername

createUser(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 use
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
deleteGroupname

deleteGroup(groupName)

dessIndentDeletes a group, returns true if no error was reported. Note: this method can only be called by an admin.prs

Parameters

sIndentgroupNamethe name of the group to delete
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
deleteUsername

deleteUser(userUID)

dessIndentDeletes an user. returns true if no error was reported. Note: this method can only be called by an admin.prs

Parameters

sIndentuserUIDThe UID of the user to be deleted.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getClientIDname

getClientID()

dessIndentReturns the client ID.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getElementUUIDsname

getElementUUIDs(formname)

dessIndentReturns the form elements UUID's as dataset, the one with no name is the form itself.prs

Parameters

sIndentformnamethe formname to retieve the dataset for
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getGroupsname

getGroups()

dessIndentGet all the groups (returns a dataset). first id column is deprecated!, use only the group name column.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getSystemUserNamename

getSystemUserName()

dessIndentRetrieves the username of the currently logged in user on operating system level.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserGroupsname

getUserGroups()

dessIndentGet all the groups of the current user.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserGroupsname

getUserGroups(userUID)

dessIndentGet all the groups for given user UID.prs

Parameters

sIndentuserUIDto retrieve the user groups
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserNamename

getUserName()

dessIndentGet the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserNamename

getUserName(userUID)

dessIndentGet the current user name (null if not logged in), finds the user name for given user UID if passed as parameter.prs

Parameters

sIndentuserUIDthe user UID used to retrieve the name
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserUIDname

getUserUID()

dessIndentGet the current user UID (null if not logged in); finds the userUID for given user_name if passed as parameter.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUserUIDname

getUserUID(username)

dessIndentGet 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 for
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUsersname

getUsers()

dessIndentGet all the users in the security settings (returns a dataset).ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUsersname

getUsers(groupName)

dessIndentGet all the users in the security settings (returns a dataset).prs

Parameters

sIndentgroupNamethe group to filter on
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
isUserMemberOfGroupname

isUserMemberOfGroup(groupName)

dessIndentCheck whatever the current user is part of the specified groupprs

Parameters

sIndentgroupNamename of the group to check
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
isUserMemberOfGroupname

isUserMemberOfGroup(groupName, userUID)

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 check
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
loginname

login(username, a_userUID, groups)

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.prs

Parameters

sIndentusernamethe username, like 'JamesWebb'a_userUIDthe user UID to process login forgroupsthe groups array
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
logoutname

logout()

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().ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
logoutname

logout(solutionToLoad)

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

sIndentsolutionToLoadthe solution to load after logout
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
logoutname

logout(solutionToLoad, method)

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

sIndentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to load
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
logoutname

logout(solutionToLoad, method, argument)

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

sIndentsolutionToLoadthe solution to load after logoutmethodthe method to run in the solution to loadargumentthe argument to pass to the method to run
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
removeUserFromGroupname

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 from
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
setPasswordname

setPassword(a_userUID, password)

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 password
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
setSecuritySettingsname

setSecuritySettings(dataset)

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 settings
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
setUserUIDname

setUserUID(a_userUID, newUserUID)

dessIndentSet a new userUID for the given userUID. Note: this method can only be called by an admin.prs

Parameters

sIndenta_userUIDthe userUID to set the new user UID fornewUserUIDthe new user UID
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow