Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Security API

About Security API

Scroll Prev Next More

 

Security API allows you to work with permissions in your application.

 
Permissions need to be set only once per user session. That's why the Security API is best used in the After Successful Login event.

Functions

Function

Description

getUserGroup()

Returns the current user group name. Makes more sense to use with static permissions where each user belongs to a single user group.

getUserGroups()

Returns an array with all user groups.

getUserName()

Returns the current Username.

getDisplayName()

Returns the current Display Name.

setDisplayName()

Set the current Display Name.

isGuest()

Returns true if the user logged in as Guest, returns false otherwise.

isAdmin()

Returns true if the user is an Admin, returns false otherwise.

isLoggedIn()

Returns true if the user is logged in, returns false otherwise.

loginAs()

Logs the user in, no redirects.

logout()

Logs the user out, no redirects.

getOwnerId()

setOwnerId()

These functions get or set the OwnerID for a specific table when Advanced Security options like Users can see and edit their own data are in use.

checkUsernamePassword()

This function checks the username and password and returns true if the username/password are correct, returns false otherwise.

getUserData()

Returns an array with user data from the Login table. Returns false if the user was not found.

currentUserData()

Returns an array with the current user data from the Login table.

getPermissions()

setPermissions()

Gets/sets permissions for a certain table.

setAllowedPages()

Specifies which pages the current user can access.

See also:

Security screen

Registration and passwords

User group permissions

Dynamic permissions

Advanced security settings

Displaying a list of users that are currently logged in

Building secure low code web applications