NIHVIVO-2279 transitioning toward UserAccount
This commit is contained in:
parent
032d9deb8c
commit
5e92e161b2
1 changed files with 8 additions and 17 deletions
|
@ -119,29 +119,20 @@ public class UserRetryController extends BaseEditController {
|
||||||
|
|
||||||
/* bdc34: Datastar needs non-backend-editing users for logging in non-Cornell people*/
|
/* bdc34: Datastar needs non-backend-editing users for logging in non-Cornell people*/
|
||||||
/* SelfEditingPolicySetup.SELF_EDITING_POLICY_WAS_SETUP is set by the SelfEditingPolicySetup context listener */
|
/* SelfEditingPolicySetup.SELF_EDITING_POLICY_WAS_SETUP is set by the SelfEditingPolicySetup context listener */
|
||||||
boolean selfEditing = (Boolean)getServletContext().getAttribute(SelfEditingPolicySetup.SELF_EDITING_POLICY_WAS_SETUP) == Boolean.TRUE;
|
Option nonEditor = new Option(ROLE_PROTOCOL+1, "self editor");
|
||||||
Option nonEditor = new Option(ROLE_PROTOCOL+LoginStatusBean.NON_EDITOR, "self editor");
|
|
||||||
/* self editing should be displayed if we are editing a user account that is already
|
/* self editing should be displayed if we are editing a user account that is already
|
||||||
* self-editing even if self editing is off. */
|
* self-editing even if self editing is off. */
|
||||||
if( selfEditing ||
|
|
||||||
( !"insert".equals(action) && userForEditing.getRoleURI().equals(nonEditor.getValue()) )){
|
|
||||||
nonEditor.setSelected(userForEditing.getRoleURI().equals(nonEditor.getValue()));
|
|
||||||
if (nonEditor.getSelected() || loginBean.isLoggedInAtLeast(LoginStatusBean.NON_EDITOR))
|
|
||||||
roleOptionList.add(nonEditor);
|
roleOptionList.add(nonEditor);
|
||||||
}
|
|
||||||
|
|
||||||
Option editor = new Option(ROLE_PROTOCOL+LoginStatusBean.EDITOR, "editor");
|
Option editor = new Option(ROLE_PROTOCOL+4, "editor");
|
||||||
editor.setSelected(userForEditing.getRoleURI().equals(editor.getValue()));
|
editor.setSelected(userForEditing.getRoleURI().equals(editor.getValue()));
|
||||||
Option curator = new Option(ROLE_PROTOCOL+LoginStatusBean.CURATOR, "curator");
|
Option curator = new Option(ROLE_PROTOCOL+5, "curator");
|
||||||
curator.setSelected(userForEditing.getRoleURI().equals(curator.getValue()));
|
curator.setSelected(userForEditing.getRoleURI().equals(curator.getValue()));
|
||||||
Option administrator = new Option (ROLE_PROTOCOL+LoginStatusBean.DBA, "system administrator");
|
Option administrator = new Option (ROLE_PROTOCOL+50, "system administrator");
|
||||||
administrator.setSelected(userForEditing.getRoleURI().equals(administrator.getValue()));
|
administrator.setSelected(userForEditing.getRoleURI().equals(administrator.getValue()));
|
||||||
|
|
||||||
if (editor.getSelected() || loginBean.isLoggedInAtLeast(LoginStatusBean.EDITOR))
|
|
||||||
roleOptionList.add(editor);
|
roleOptionList.add(editor);
|
||||||
if (curator.getSelected() || loginBean.isLoggedInAtLeast(LoginStatusBean.CURATOR))
|
|
||||||
roleOptionList.add(curator);
|
roleOptionList.add(curator);
|
||||||
if (administrator.getSelected() || loginBean.isLoggedInAtLeast(LoginStatusBean.DBA))
|
|
||||||
roleOptionList.add(administrator);
|
roleOptionList.add(administrator);
|
||||||
|
|
||||||
optionMap.put("Role", roleOptionList);
|
optionMap.put("Role", roleOptionList);
|
||||||
|
|
Loading…
Add table
Reference in a new issue