Purpose
This display is used on the user account administration screen. It is called to obtain a list of tabs to be added to the User Account Screen.
Applies To
User Account Display
Signature
public String[][] ucUAGetTabs(
String mode,
Connection dbconn,
SesameSession session) throws Exception {
Notes
Example
public String[][] ucUAGetTabs(String mode,
Connection dbconn,
SesameSession session) throws Exception {
//check security permissions
String mUser = session.getUserId();
int mArea = session.getArea();
int mProject = session.getProject();
boolean userAreaRolePerm =SecurityPermission.getObjectAccess(
"UC_USER_AREA_ROLE",
SecurityPermission.WRITE,
mUser, mArea, mProject, session);
boolean userUserGroupPerm = SecurityPermission.getObjectAccess(
"UC_USER_USER_GROUP",
SecurityPermission.WRITE,
mUser, mArea, mProject, session);
boolean userSecurityGroupPerm = SecurityPermission.getObjectAccess(
"SE_SECURITY_GROUP",
SecurityPermission.WRITE,
mUser, mArea, mProject, session);
String[][] tabs = null;
if (userAreaRolePerm && (userUserGroupPerm && userSecurityGroupPerm)) {
tabs = new String[][] {
new String[] {"UserAreaRole", Z.m.msg(session, "Area/Role Mapping"), ""}
new String[] {"UserUserGroups", Z.m.msg(session, "User Groups"), ""}
};
} else if (userAreaRolePerm && userSecurityGroupPerm) {
tabs = new String[][] {
new String[] {"UserAreaRole", Z.m.msg(session, "Area/Role Mapping"), ""},
new String[] {"UserUserGroups", Z.m.msg(session, "User Groups"), "adminOnly"}
};
} else if (userUserGroupPerm ) {
tabs = new String[][] {
new String[] {"UserAreaRole", Z.m.msg(session, "Area/Role Mapping"), "adminOnly"},
new String[] {"UserUserGroups", Z.m.msg(session, "User Groups"), ""}
};
}
return tabs;
}