From 7da535e70a67432a1f7b8c4922b339bc98187d36 Mon Sep 17 00:00:00 2001 From: j2blake Date: Tue, 6 Mar 2012 21:59:48 +0000 Subject: [PATCH] NIHVIVO-2855 If editing the root user account, don't allow an ExternalAuthID, or the flag of ExternalAuthOnly. --- .../controller/accounts/admin/UserAccountsEditPage.java | 1 + .../freemarker/body/accounts/userAccounts-edit.ftl | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/UserAccountsEditPage.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/UserAccountsEditPage.java index 672d2883f..0b2e81045 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/UserAccountsEditPage.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/accounts/admin/UserAccountsEditPage.java @@ -237,6 +237,7 @@ public class UserAccountsEditPage extends UserAccountsPage { if (!isRootUser()) { body.put("roles", buildListOfSelectableRoles()); + body.put("externalAuthPermitted", Boolean.TRUE); } body.put("profileTypes", buildProfileTypesList()); diff --git a/webapp/web/templates/freemarker/body/accounts/userAccounts-edit.ftl b/webapp/web/templates/freemarker/body/accounts/userAccounts-edit.ftl index afc68e1ed..f2dce4cab 100644 --- a/webapp/web/templates/freemarker/body/accounts/userAccounts-edit.ftl +++ b/webapp/web/templates/freemarker/body/accounts/userAccounts-edit.ftl @@ -62,9 +62,12 @@ - <#include "userAccounts-associateProfilePanel.ftl"> + <#if externalAuthPermitted??> + <#include "userAccounts-associateProfilePanel.ftl"> + +

checked />Externally Authenticated Only

+ -

checked />Externally Authenticated Only

<#if roles?has_content>

Roles *

<#list roles as role>