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

servoy sReturnTypes2100%height: 30px;2Supported 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.

Set a new password for the given userUID.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.Removes an user from a group.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

ACCESSIBLE

dessIndent
Constant representing the accessible flag for form security.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowDELETEname

DELETE

dessIndent
Constant representing the delete flag for table security.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
INSERTname

INSERT

dessIndent
Constant representing the insert flag for table security.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
READname

READ

dessIndent
Constant representing the read flag for table security.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
TRACKINGname

TRACKING

dessIndent
Constant 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

dessIndent
Constant 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

dessIndent
Constant representing the update flag for table security.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
VIEWABLEname

VIEWABLE

dessIndent
Constant 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)

dessIndent
Adds 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 true if added
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowauthenticatename

authenticate(credentials)

dessIndent
Authenticate 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 authentication result from authenticator solution or boolean in case of servoy built-in authentication
clients

Supported Clients

sIndentNGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
authenticatename

authenticate(authenticator_solution, method)

dessIndent
Authenticate 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 authentication result from authenticator solution or boolean in case of servoy built-in authentication
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
authenticatename

authenticate(authenticator_solution, method, credentials)

dessIndent
Authenticate 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 authentication result from authenticator solution or boolean in case of servoy built-in authentication
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
canDeletecanAccessname

canDelete

canAccess(

dataSource

formName)

dessIndent
Returns 
a
whether form 
boolean
is 
value
accessible.
for

security
rights
.canAccess(formName)
prs

Parameters

sIndent
dataSourcethe datasourceformNameform nameret

Returns

sIndent true if accessible
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
canInsertcanAccessname

canInsert

canAccess(

dataSource

formName, elementName)

dessIndent
Returns 
a boolean value for security rights.
whether element from form is accessible.

security.canAccess(formName,elementName)
prs

Parameters

sIndent
dataSourcethe datasourceformNameform nameelementNameelement name from specified formret

Returns

sIndent true if accessible
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
canReadcanDeletename

canRead

canDelete(dataSource)

dessIndent
Returns a boolean value for security rights.
prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent true if allowed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
canUpdatecanInsertname

canUpdate

canInsert(dataSource)

dessIndent
Returns a boolean value for security rights.
prs

Parameters

sIndentdataSourcethe datasource
ret

Returns

sIndent true if allowed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
changeGroupNamecanReadname

changeGroupName

canRead(

oldGroupName, newGroupName

dataSource)

dessIndent
Changes the groupname of 
Returns a 
group.
boolean 
Note:
value 
this
for 
method can only be called by an adminnewGroupNamethe new name
security rights.
prs

Parameters

sIndent
oldGroupNamethe old namedataSourcethe datasourceret

Returns

sIndent true if allowed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
changeUserNamecanUpdatename

changeUserName(a_userUID, username

canUpdate(dataSource)

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
Returns a boolean value for security rights.
prs

Parameters

sIndent
a_userUIDthe userUID to work onusernamethe new usernamedataSourcethe datasourceret

Returns

sIndent true if allowed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
checkPasswordcanViewname

checkPassword(a_userUID, password)

canView(formName)

dessIndent
Returns 
true if the password for that userUID is correct, else false.
whether form is viewable.

security.canView(formName)
prs

Parameters

sIndent
a_userUIDthe userUID to check the password forpasswordthe new passwordformNameform nameret

Returns

sIndent true if viewable
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createGroupcanViewname

createGroup

canView(

groupName

formName, elementName)

dessIndent
Creates
Returns 
a
whether 
group,
element 
returns
from 
the
form 
groupname
is 
(or
viewable.
null when group couldn't be created). Note: this method can only be called by an admin.

security.canView(formName,elementName)
prs

Parameters

sIndent
groupNamethe group name to createformNameform nameelementNameelement name from specified formret

Returns

sIndent true if viewable
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createUserchangeGroupNamename

createUser

changeGroupName(

username

oldGroupName,

password

newGroupName)

dessIndent
Creates
Changes 
a
the 
new
groupname 
user,
of 
returns new uid (or null when group couldn't be created or user alreay exist)
a group.
Note: this method can only be called by an admin.
prs

Parameters

sIndent
usernamethe usernamepasswordthe user passwordoldGroupNamethe old namenewGroupNamethe new nameret

Returns

sIndent true if changed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
createUserchangeUserNamename

createUser

changeUserName(

username, password, userUID

a_userUID, username)

dessIndent
Creates
Changes 
a
the 
new
username 
user,
of 
returns
the 
new
specified 
uid (or null when group couldn't
userUID.
Note: this method can only be 
created
called 
or
by 
user
an 
alreay
admin 
exist). 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
usernamepasswordthe user passworduserUIDthe user UID to usenew usernameret

Returns

sIndenttrue if changed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
deleteGroupcheckPasswordname

deleteGroup(groupName

checkPassword(a_userUID, password)

dessIndent
Deletes
Returns 
a
true 
group,
if 
returns
the 
true
password 
if
for 
no
that 
error
userUID 
was
is 
reported. Note: this method can only be called by an admin
correct, else false.
prs

Parameters

sIndent
groupNamethe name of the group to deletea_userUIDthe userUID to check the password forpasswordthe new passwordret

Returns

sIndent true if password oke
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
deleteUsercreateGroupname

deleteUser

createGroup(

userUID

groupName)

dessIndent
Deletes
Creates 
an
a 
user.
group, returns 
true if no error was reported
the groupname (or null when group couldn't be created).
Note: this method can only be called by an admin.
prs

Parameters

sIndent
userUIDThe UID of the user to be deleted.groupNamethe group name to createret

Returns

sIndent the created groupname
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getClientIDcreateUsername

getClientID

createUser(username, password)

dessIndent
Returns
Creates 
the
a 
client ID.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowgetElementUUIDsname

getElementUUIDs(formname)

dessIndentReturns the form elements UUID's as dataset, the one with no name is the form itself
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

sIndent
formnamethe formname to retieve the dataset forusernamethe usernamepasswordthe user passwordret

Returns

sIndent
clients the userUID the created userUID, will be same if providedclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getGroupscreateUsername

getGroups

createUser(username, password, userUID)

dessIndent
Get
Creates 
all
a 
the
new 
groups
user, 
(
returns 
a
new 
dataset). first id column is deprecated!, use only the group name column.ret

Returns

sIndent
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 the userUID the created userUID, will be same if provided
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSystemUserNamedeleteGroupname

getSystemUserName

deleteGroup(groupName)

dessIndent
Retrieves
Deletes 
the
a 
username
group, 
of
returns 
the
true 
currently
if 
logged
no 
in
error 
user
was 
on operating system level.
reported.
Note: this method can only be called by an admin.
prs

Parameters

sIndentgroupNamethe name of the group to delete
ret

Returns

sIndent true if deleted
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserGroupsdeleteUsername

getUserGroups

deleteUser(userUID)

dessIndent
Get all the groups of the current user.ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowgetUserGroupsname

getUserGroups(userUID)

dessIndentGet all the groups for given user UID
Deletes an user. returns true if no error was reported.
Note: this method can only be called by an admin.
prs

Parameters

sIndentuserUID
to retrieve The UID of the user groupsto be deleted.ret

Returns

sIndenttrue if the user is successfully deleted.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserNamegetClientIDname

getUserName

getClientID()

dessIndent
Get
Returns the 
current user name (null if not logged in), finds the user name for given user UID if passed as parameter.ret
client ID.
ret

Returns

sIndent the clientId as seen on the server admin page
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
getUserNamegetElementUUIDsname

getUserName

getElementUUIDs(

userUID

formname)

dessIndent
Get
Returns the 
current
form 
user
elements 
name (null if not logged in), finds the user name for given user UID if passed as parameter
UUID's as dataset, the one with no name is the form itself.
prs

Parameters

sIndent
userUIDformnamethe user UID used formname to retrieve retieve the namedataset forret

Returns

sIndentdataset with element info
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserUIDgetGroupsname

getUserUID

getGroups()

dessIndent
Get all the 
current
groups 
user
(returns 
UID (null if not logged in); finds the userUID for given user_name if passed as parameter
a dataset).
first id column is deprecated!, use only the group name column.
ret

Returns

sIndent dataset with all the groups
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserUIDgetSystemUserNamename

getUserUID

getSystemUserName(

username

)

dessIndent
Get
Retrieves the 
current
username 
user
of 
UID
the 
(null if not
currently logged in
); finds the userUID
 
for given
user
_name
 
if
on 
passed
operating 
as
system 
parameter
level.
prsParameters
sIndentusernamethe username to find the userUID forret

Returns

sIndent the os user name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUsersgetTenantValuename

getUsers

getTenantValue()

dessIndent
Get
Retrieve 
all
the 
users
tenant 
in
value 
the
for 
security
this 
settings
Client, 
(returns
this 
a dataset).ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascriptlastDetailRowgetUsersname

getUsers(groupName)

dessIndentGet all the users in the security settings (returns a dataset).
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

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserGroupsname

getUserGroups()

dessIndent
Get all the groups of the current user.
ret

Returns

sIndent dataset with groupnames
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserGroupsname

getUserGroups(userUID)

dessIndent
Get all the groups for given user UID.
prs

Parameters

sIndentuserUIDto retrieve the user groups
ret

Returns

sIndent dataset with groupnames
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserNamename

getUserName()

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

Returns

sIndent the user name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserNamename

getUserName(userUID)

dessIndent
Get 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 the user name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserUIDname

getUserUID()

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

Returns

sIndent the userUID
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUserUIDname

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

Returns

sIndent the userUID
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUsersname

getUsers()

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

Returns

sIndent dataset with all the users
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUsersname

getUsers(groupName)

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

Parameters

sIndentgroupNamethe group to filter on
ret

Returns

sIndent dataset with all the users
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isUserMemberOfGroupname

isUserMemberOfGroup(groupName)

dessIndent
Check whatever the current user is part of the specified group
prs

Parameters

sIndentgroupNamename of the group to
filter oncheckret

Returns

sIndentdataset with groupnames
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isUserMemberOfGroupname

isUserMemberOfGroup(groupName, userUID)

dessIndent
Check whatever the user 
the
specified 
current
as 
user
parameter is part of the specified group.
prs

Parameters

sIndentgroupNamename of the group to checkuserUIDUID of the user to check
ret

Returns

sIndent dataset with groupnames
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isUserMemberOfGrouploginname

isUserMemberOfGroup

login(

groupName

username, a_userUID

)dessIndentCheck whatever the user specified as parameter is part of the specified groupuserUIDUID of the user to check

, 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

sIndent
groupNamename of the group to checkusernamethe username, like 'JamesWebb'a_userUIDthe user UID to process login forgroupsthe groups arrayret

Returns

sIndent true if loggedin
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
loginlogoutname

login(username, a_userUID, groups

logout()

dessIndent
Login to be able to leave
Logout the current user and close the solution, if 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
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().
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
logoutname

logout(solutionToLoad)

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 logout
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
,MobileClientsam

Sample

sIdentjavascript
lastDetailRow
logoutname

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 onOpen
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
logoutname

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 load
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
logoutname

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 run
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
removeUserFromGroupname

removeUserFromGroup(a_userUID, groupName)

dessIndent
Removes 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 true if removed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setPasswordname

setPassword(a_userUID, password)

dessIndent
Set 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 true if changed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setSecuritySettingsname

setSecuritySettings(dataset)

dessIndent
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 settings
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setTenantValuename

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

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
setUserUIDname

setUserUID(a_userUID, newUserUID)

dessIndent
Set 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 true if changed
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow