Back

Populating Roles


A Logon Service can assign Roles to a user. The Security Manager can query the Roles held by the current user and use this information to grant access or modify form behaviour.

Roles are stored in a dedicated CUSTOMROLE table in the Logon Service. The CUSTOMROLE table contains a ROLEID column. To add a Role to a user, insert a new row into this table, specifying a unique role name as the ROLEID.

// Add the "admin" role to the user
tables.CUSTOMROLE.insertRow();
tables.CUSTOMROLE.ROLEID.value = "admin";
tables.CUSTOMROLE.updateTable();

An EBASEROLE table also exists in the Logon Service. This is reserved for use by the Ebase Logon System and manages access to the Server Admin App.