Documentation

(applications)

Menu configuration (Multiuser)

ProjX reads the menu configuration from the database. It's not needed to build the menu manually. You configure/map your work-screens and create access roles like Administrator, Developer, User. You have to assign your screens to roles, e.g. a Developer has access to all screens, an Administrator has access to all application screens but not to development screens, and so on.

The ProjX application supports multiuser applications out-of-the-box without writing one line source code.

Be sure that your database has following tables: USERS, ROLES, WOKSCREENS, USER_ROLE, ROLE_WOSC and following Views: V_ACCESSRULES, V_USERROLES, V_USERSCREENS.

Add the object com.sibvisions.apps.server.object.DBWorkScreenAccess to your Session life-cycle object:

public IWorkScreenAccess getWorkScreenAccess() throws Exception
{
    DBWorkScreenAccess dbwsac = (DBWorkScreenAccess)get("workScreenAccess");
 
    if (dbwsac == null)
    {
        dbwsac = new DBWorkScreenAccess();
        dbwsac.setDBDataSource(getDBAccess());
 
        put("workScreenAccess", dbwsac);
    }
 
    return dbwsac;          
}

The DBWorkScreen class implements the IAccessController interface and you should configure the accesscontroller in your config.xml:

<accesscontroller>com.sibvisions.apps.server.object.DBWorkScreenAccess</accesscontroller>

The access controller reads V_ACCESSRULES and checks the access to life-cycle objects.

After successful configuration, map your screens. The workscreens table should be self explained:

Name           TYPE         
-------------- -------------
ID             NUMBER(16)   
TEXT           VARCHAR2(200)
SIDEBAR_TEXT   VARCHAR2(200)
MENU_STRUCTURE VARCHAR2(200)
IMAGE          VARCHAR2(200)
SIDEBAR_IMAGE  VARCHAR2(200)
SEQUENCE       NUMBER(16)   
CLASSNAME      VARCHAR2(200)
LIFECYCLENAME  VARCHAR2(200)
SHORTCUT       VARCHAR2(1)  

And don't forget the role assignment per user. It's a simple n:m relation.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information