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

--Menu configuration (Multiuser)

Information about development with ProjX.

--Menu configuration (Multiuser)

Postby Development@SIB » Sat Dec 22, 2012 10:25 pm



This article is outdated - please use our new system at

https://doc.sibvisions.com




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:
Syntax: [ Download ] [ Hide ]
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:

Code: Select all
<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:

Code: Select all
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.
User avatar
Development@SIB
 
Posts: 325
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation