Security Functions


Alpha Anywhere provides the following security functions for working with web security.


Allows the administrator to add a new Group to the user/groups file.

A5_ADD_NEW_USER Function

Allows the administrator to add a new user account. Member_of is a semi_colon (;) delimited list of groups that the user is a member of.


Allows the administrator to add or drop a user from one or more groups. Group_names is a semi_colon (;) delimited list of groups.

a5_audit_trail Function

Call this function from a table's CanSaveRecord event. UserNameMode = 1 - user the user name in the A5 Security System is inserted into the audit-trail. UserNameMode = 2 - Windows logon user name.


Change permissions on an object for a given group.


Allows a user to change his logon password


The A5_CHANGELOGGEDONUSER() function displays the Change Logged On User dialog box, allowing you to log onto Alpha Anywhere as a different user. The function closes all currently open windows. However, this is not like reopening the database, so the autoexec script will not be re-run and the startup form will not be executed. All that happens is the windows are closed and the user is changed.If the developer wants to start over, they should call a5.load(a5.get_name() ).This will completely reopen the database and prompt for a logon again.

a5_changelogonpassword Function

Allow a user to change their log-in password.

A5_Decrypt_Binary Function

Decrypts an encrypted binary and returns the original binary.

A5_Decrypt_String Function

Decrypts a base64 encoded encrypted string and returns the original string. The A5_Decrypt_String() function decodes a character string.


The A5_DELETE_GROUP() function allows the administrator to delete a group from the user/groups (UAF) file.


The A5_DELETE_USER() function allows the administrator to delete a user account

A5_Encrypt_Binary Function

Encrypts a binary object and returns the binary result. The A5_Encrypt_String() function encodes a character string.

A5_Encrypt_String Function

Encrypts a string and returns the base64 encoded result. The A5_Encrypt_String() function encodes a character string.


Gets the names of all users that a group has as its members. Returns a crlf delimited list.

A5_GET_GROUPS Function

Gets the names of all groups. Returns a crlf delimited list. If you are not logged on as the Administrator, then you must supply the master password.


Gets the names of all groups that a user is a member of. Returns a crlf delimited list.

A5_GET_USERS Function

Gets the names of all groups that a user is a member of. Returns a crlf delimited list.

A5_GetAttemptedUser Function

Return the last user that attempted to log in.


Returns .T. if specified group has all permission to name/class, .F. otherwise


Returns whether a user has access to an object

a5_prompt_for_key Function

Prompt for the name of a key or keystroke combination

A5_SEC_GET_GID Function

The A5_SEC_GET_GID() function returns a group ID from a group name. This function is used to supply the group ID for A5_GROUP_HAS_PERMISSION().

a5_secencryptpwd Function

Encrypt a password

A5_SecGroupHasPermission Function

The A5_SecGroupHasPermission() indicates whether a named group has permission to an object.

A5_Security_Option Function

The A5_Security_Option() function displays the appropriate dialog box to perform a security function. Invokes one of the security menu options. Option matches the wording on the menu. e.g. "Set Database Password"

A5_SecurityEnabled Function

The A5_SecurityEnabled() function returns .T. (TRUE) if the current database requires a password to open it. It returns .T. if security is enabled in this database, .F. otherwise


The A5_USER_GROUPS_DIALOG() function displays the Users and Groups dialog box, if user and group security is enabled, and if the user is logged on with the Master Password.


The A5_USERBELONGSTO() function indicates whether a User belongs to a Group or, if a User is not specified, if the specified Group exists. The function is not meaningful if you are logged on as "Administrator".

a5Helper_getAuditInfoFromSQLStatement Function

Computes the fields and operation for a SQL statement as a JSON object in an application with auditing enabled.

a5Helper_SQL_ApplySecurity Function

Applies security to a SQL SELECT statement. Only applies if the SQL statement can be parsed.

a5Helper_writeToAuditingLog Function

Writes an entry to the audit table in an application with auditing enabled.

a5upsize_prompt_primarykey Function

prompts for a surrogate primary key.

a5w_rulesave Function

Save a set of Validation rules away with a name

a5w_rulesenum Function

List validation rules defined in a project

a5w_rulesload Function

Load Validation rules from file

a5ws_add_oauthuser Function

Add a new oAuthUser to the websecurity_oauth table

a5ws_cleanpagesecurity Function

Cleans 'pages.SecuritySettings' file to remove any files that no longer exist in the project. If 'project' is not supplied, the current project is used

a5ws_getaltloginlistforcurrentuser Function

Get a list of all alternative logins assigned to the curent user. 'ResourceProviders' will be used as the field name if one is not supplied. Only used on applciation server

a5ws_importusers Function

Import selected User records from an external table into the current project web security users table

a5ws_randompassword Function

Generate a new random password that meets the current security settings. Will only return a password when running on the Application Server

a5ws_refreshpasswordencryptionutility Function

Utility to convert encrypted stored passwords to the latest methods. This should only be run once.

a5ws_ReloadWebSecurity Function

Reloads the web security information on the Alpha Anywhere Standard Application Server. This function cannot be used with IIS or Alpha Cloud.

a5ws_saveuserswithdialog Function

Used by server-side action scripting to save security values passed into the function form a UX Component with controls mapped to security system fields.

a5ws_validateuserswithdialog Function

Validate web security values in dialog2 component. Normally placed in 'dialogValidate' server side event.

a5ws_VerifySQLDataConfig Function

Used by web security to verify if SQL tables are used by security and if they are valid and can be accessed.


Retrieve a list of users from either machine or domain specified by 'Location.' If no parameters are specified, it will retrieve the users from the current machine.


Opens the Set Button Password dialog.


Specifies whether or not the workspace requires a password to open it.

getsecurityintegritylevel Function

Returns the level of integrity of the process.

rsa_hash Function

General Security. Generates an RSA digital signature of the data using the key and SHA1, or any other signing method supported by the .NET Framework

security_enable Function

Turn on security.

security_enabled Function

Returns true if security is enabled .

security_execution_level Function

Set the level at which security is implemented (SYSTEM/APPLICATION).

security_expression_set Function

Set the system security expression.

security_variables Function

Get pointer to the system security variables.


USER_GROUPS() creates a CR-LF delimited character string list that lists the groups that the current user is a member of. Requires that the database be password protected.

USER_NAME Function

USER_NAME() returns the name of the current logged on user. Requires that the database be password protected.

Web Security Functions

A list of web security functions in Alpha Anywhere.