mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. First cut of User Settings page
- will contain useful things like User Info (which can be changed e.g. name and email), Change Password, View Settings etc. - Added Change Password page implementation . Preferences Service for web-client - handles and hides away the retrieving and storing properties from the configurable aspect on the current Person - simple use case such as: PreferencesService.getPreferences().setValue(name, value); . Moved Admin Console to title area in main UI page . Fixed various Admin Console actions to use dialog framework navigation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3315 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -843,6 +843,19 @@ recovery_report_success=The following items were recovered successfully
|
|||||||
recovery_report_failed=The following items failed to recover
|
recovery_report_failed=The following items failed to recover
|
||||||
recovery_report_reason=Failure Reason
|
recovery_report_reason=Failure Reason
|
||||||
|
|
||||||
|
# My Alfresco messages
|
||||||
|
my_alfresco=My Alfresco
|
||||||
|
title_user_console=User Options
|
||||||
|
user_console=User Options
|
||||||
|
user_console_info=User Options
|
||||||
|
user_console_description=Use this page to change your options and settings
|
||||||
|
my_details=My Details
|
||||||
|
general_pref=General Preferences
|
||||||
|
change_my_password_description=Use this view to change your password
|
||||||
|
change_my_password_instructions=Enter your new password.
|
||||||
|
old_password=Old Password
|
||||||
|
new_password=New Password
|
||||||
|
|
||||||
# Admin Console messages
|
# Admin Console messages
|
||||||
title_admin_console=Administration Console
|
title_admin_console=Administration Console
|
||||||
admin_console=Administration Console
|
admin_console=Administration Console
|
||||||
|
@@ -42,9 +42,8 @@
|
|||||||
<!-- set this value to true to enable AND text terms for simple/advanced search by default -->
|
<!-- set this value to true to enable AND text terms for simple/advanced search by default -->
|
||||||
<search-and-terms>false</search-and-terms>
|
<search-and-terms>false</search-and-terms>
|
||||||
|
|
||||||
<!-- Limit search results. -1 for unlimited. -->
|
<!-- Limit search results. -1 for unlimited. -->
|
||||||
<search-max-results>-1</search-max-results>
|
<search-max-results>-1</search-max-results>
|
||||||
|
|
||||||
|
|
||||||
<!-- The default permissions to apply to a new users Home Space when first created -->
|
<!-- The default permissions to apply to a new users Home Space when first created -->
|
||||||
<!-- this permission is for other users attempting to access that Home Space -->
|
<!-- this permission is for other users attempting to access that Home Space -->
|
||||||
|
@@ -34,10 +34,9 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
|||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.security.AccessStatus;
|
import org.alfresco.service.cmr.security.AccessStatus;
|
||||||
import org.alfresco.service.cmr.security.PermissionService;
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
|
||||||
import org.alfresco.web.app.Application;
|
import org.alfresco.web.app.Application;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
import org.alfresco.web.bean.repository.PreferencesService;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||||
@@ -65,7 +64,7 @@ public class UserShortcutsBean
|
|||||||
/** List of shortcut nodes */
|
/** List of shortcut nodes */
|
||||||
private List<Node> shortcuts = null;
|
private List<Node> shortcuts = null;
|
||||||
|
|
||||||
private QName QNAME_SHORTCUTS = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "shortcuts");
|
private String PREF_SHORTCUTS = "shortcuts";
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
@@ -113,8 +112,7 @@ public class UserShortcutsBean
|
|||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
// get the shortcuts from the preferences for this user
|
// get the shortcuts from the preferences for this user
|
||||||
prefRef = getShortcutsNodeRef();
|
shortcuts = (List<String>)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
|
||||||
shortcuts = (List<String>)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
|
|
||||||
if (shortcuts != null)
|
if (shortcuts != null)
|
||||||
{
|
{
|
||||||
// each shortcut node ID is persisted as a list item in a well known property
|
// each shortcut node ID is persisted as a list item in a well known property
|
||||||
@@ -184,7 +182,7 @@ public class UserShortcutsBean
|
|||||||
{
|
{
|
||||||
shortcuts.add(this.shortcuts.get(i).getId());
|
shortcuts.add(this.shortcuts.get(i).getId());
|
||||||
}
|
}
|
||||||
this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
|
PreferencesService.getPreferences().setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
|
||||||
}
|
}
|
||||||
catch (Exception err)
|
catch (Exception err)
|
||||||
{
|
{
|
||||||
@@ -246,14 +244,13 @@ public class UserShortcutsBean
|
|||||||
tx = Repository.getUserTransaction(context);
|
tx = Repository.getUserTransaction(context);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
NodeRef prefRef = getShortcutsNodeRef();
|
List<String> shortcuts = (List<String>)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
|
||||||
List<String> shortcuts = (List<String>)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
|
|
||||||
if (shortcuts == null)
|
if (shortcuts == null)
|
||||||
{
|
{
|
||||||
shortcuts = new ArrayList<String>(1);
|
shortcuts = new ArrayList<String>(1);
|
||||||
}
|
}
|
||||||
shortcuts.add(node.getNodeRef().getId());
|
shortcuts.add(node.getNodeRef().getId());
|
||||||
this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
|
PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
|
||||||
|
|
||||||
// commit the transaction
|
// commit the transaction
|
||||||
tx.commit();
|
tx.commit();
|
||||||
@@ -280,14 +277,6 @@ public class UserShortcutsBean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the node we need to store our user preferences
|
|
||||||
*/
|
|
||||||
private NodeRef getShortcutsNodeRef()
|
|
||||||
{
|
|
||||||
return Application.getCurrentUser(FacesContext.getCurrentInstance()).getUserPreferencesRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action handler bound to the user shortcuts Shelf component called when a node is removed
|
* Action handler bound to the user shortcuts Shelf component called when a node is removed
|
||||||
*/
|
*/
|
||||||
@@ -303,13 +292,12 @@ public class UserShortcutsBean
|
|||||||
tx = Repository.getUserTransaction(context);
|
tx = Repository.getUserTransaction(context);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
NodeRef prefRef = getShortcutsNodeRef();
|
List<String> shortcuts = (List<String>)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
|
||||||
List<String> shortcuts = (List<String>)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
|
|
||||||
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
|
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
|
||||||
{
|
{
|
||||||
// remove the shortcut from the saved list and persist back
|
// remove the shortcut from the saved list and persist back
|
||||||
shortcuts.remove(shortcutEvent.Index);
|
shortcuts.remove(shortcutEvent.Index);
|
||||||
this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
|
PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
|
||||||
|
|
||||||
// commit the transaction
|
// commit the transaction
|
||||||
tx.commit();
|
tx.commit();
|
||||||
@@ -380,13 +368,12 @@ public class UserShortcutsBean
|
|||||||
tx = Repository.getUserTransaction(context);
|
tx = Repository.getUserTransaction(context);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
NodeRef prefRef = getShortcutsNodeRef();
|
List<String> shortcuts = (List<String>)PreferencesService.getPreferences(context).getValue(PREF_SHORTCUTS);
|
||||||
List<String> shortcuts = (List<String>)this.nodeService.getProperty(prefRef, QNAME_SHORTCUTS);
|
|
||||||
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
|
if (shortcuts != null && shortcuts.size() > shortcutEvent.Index)
|
||||||
{
|
{
|
||||||
// remove the shortcut from the saved list and persist back
|
// remove the shortcut from the saved list and persist back
|
||||||
shortcuts.remove(shortcutEvent.Index);
|
shortcuts.remove(shortcutEvent.Index);
|
||||||
this.nodeService.setProperty(prefRef, QNAME_SHORTCUTS, (Serializable)shortcuts);
|
PreferencesService.getPreferences(context).setValue(PREF_SHORTCUTS, (Serializable)shortcuts);
|
||||||
|
|
||||||
// commit the transaction
|
// commit the transaction
|
||||||
tx.commit();
|
tx.commit();
|
||||||
|
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
|
*/
|
||||||
|
package org.alfresco.web.bean.repository;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.faces.context.FacesContext;
|
||||||
|
|
||||||
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
|
import org.alfresco.service.namespace.QName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps the notion of preferences and settings for a User.
|
||||||
|
* Caches values until they are overwritten with a new value.
|
||||||
|
*
|
||||||
|
* @author Kevin Roast
|
||||||
|
*/
|
||||||
|
public final class Preferences
|
||||||
|
{
|
||||||
|
private NodeRef preferencesRef;
|
||||||
|
private NodeService nodeService;
|
||||||
|
private Map<String, Serializable> cache = new HashMap<String, Serializable>(16, 1.0f);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Package level constructor
|
||||||
|
*/
|
||||||
|
Preferences(NodeRef prefRef)
|
||||||
|
{
|
||||||
|
if (prefRef == null)
|
||||||
|
{
|
||||||
|
throw new IllegalArgumentException("Preferences NodeRef cannot be null.");
|
||||||
|
}
|
||||||
|
this.preferencesRef = prefRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a serialized preferences value.
|
||||||
|
*
|
||||||
|
* @param name Name of the value to retrieve.
|
||||||
|
*
|
||||||
|
* @return The value or null if not found/set.
|
||||||
|
*/
|
||||||
|
public Serializable getValue(String name)
|
||||||
|
{
|
||||||
|
Serializable value = this.cache.get(name);
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
QName qname = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, name);
|
||||||
|
value = getNodeService().getProperty(this.preferencesRef, qname);
|
||||||
|
this.cache.put(name, value);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a serialized preference value.
|
||||||
|
*
|
||||||
|
* @param name Name of the value to set.
|
||||||
|
* @param value Value to set.
|
||||||
|
*/
|
||||||
|
public void setValue(String name, Serializable value)
|
||||||
|
{
|
||||||
|
QName qname = QName.createQName(NamespaceService.APP_MODEL_1_0_URI, name);
|
||||||
|
// persist the property to the repo
|
||||||
|
getNodeService().setProperty(this.preferencesRef, qname, value);
|
||||||
|
// update the cache
|
||||||
|
this.cache.put(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the NodeService instance.
|
||||||
|
*/
|
||||||
|
private NodeService getNodeService()
|
||||||
|
{
|
||||||
|
if (this.nodeService == null)
|
||||||
|
{
|
||||||
|
this.nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
|
||||||
|
}
|
||||||
|
return this.nodeService;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
|
*/
|
||||||
|
package org.alfresco.web.bean.repository;
|
||||||
|
|
||||||
|
import javax.faces.context.FacesContext;
|
||||||
|
|
||||||
|
import org.alfresco.web.app.Application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple client service to retrieve the Preferences object for the current User.
|
||||||
|
*
|
||||||
|
* @author Kevin Roast
|
||||||
|
*/
|
||||||
|
public final class PreferencesService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Private constructor
|
||||||
|
*/
|
||||||
|
private PreferencesService()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The Preferences for the current User instance.
|
||||||
|
*/
|
||||||
|
public static Preferences getPreferences()
|
||||||
|
{
|
||||||
|
return getPreferences(FacesContext.getCurrentInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param fc FacesContext
|
||||||
|
* @return The Preferences for the current User instance.
|
||||||
|
*/
|
||||||
|
public static Preferences getPreferences(FacesContext fc)
|
||||||
|
{
|
||||||
|
User user = Application.getCurrentUser(fc);
|
||||||
|
return getPreferences(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param user User instance
|
||||||
|
* @return The Preferences for the current User instance.
|
||||||
|
*/
|
||||||
|
public static Preferences getPreferences(User user)
|
||||||
|
{
|
||||||
|
return user.getPreferences();
|
||||||
|
}
|
||||||
|
}
|
@@ -45,8 +45,7 @@ public final class User
|
|||||||
private String fullName = null;
|
private String fullName = null;
|
||||||
private Boolean administrator = null;
|
private Boolean administrator = null;
|
||||||
|
|
||||||
/** cached ref to our user preferences node */
|
private Preferences preferences = null;
|
||||||
private NodeRef preferencesFolderRef = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -139,63 +138,70 @@ public final class User
|
|||||||
return administrator;
|
return administrator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return The Preferences for the User
|
||||||
|
*/
|
||||||
|
Preferences getPreferences()
|
||||||
|
{
|
||||||
|
if (this.preferences == null)
|
||||||
|
{
|
||||||
|
this.preferences = new Preferences(getUserPreferencesRef());
|
||||||
|
}
|
||||||
|
return this.preferences;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get or create the node used to store user preferences.
|
* Get or create the node used to store user preferences.
|
||||||
* Utilises the 'configurable' aspect on the Person linked to this user.
|
* Utilises the 'configurable' aspect on the Person linked to this user.
|
||||||
*/
|
*/
|
||||||
public synchronized NodeRef getUserPreferencesRef()
|
synchronized NodeRef getUserPreferencesRef()
|
||||||
{
|
{
|
||||||
if (this.preferencesFolderRef == null)
|
FacesContext fc = FacesContext.getCurrentInstance();
|
||||||
|
ServiceRegistry registry = Repository.getServiceRegistry(fc);
|
||||||
|
NodeService nodeService = registry.getNodeService();
|
||||||
|
SearchService searchService = registry.getSearchService();
|
||||||
|
NamespaceService namespaceService = registry.getNamespaceService();
|
||||||
|
ConfigurableService configurableService = Repository.getConfigurableService(fc);
|
||||||
|
|
||||||
|
NodeRef person = Application.getCurrentUser(fc).getPerson();
|
||||||
|
if (nodeService.hasAspect(person, ContentModel.ASPECT_CONFIGURABLE) == false)
|
||||||
{
|
{
|
||||||
FacesContext fc = FacesContext.getCurrentInstance();
|
// create the configuration folder for this Person node
|
||||||
ServiceRegistry registry = Repository.getServiceRegistry(fc);
|
configurableService.makeConfigurable(person);
|
||||||
NodeService nodeService = registry.getNodeService();
|
|
||||||
SearchService searchService = registry.getSearchService();
|
|
||||||
NamespaceService namespaceService = registry.getNamespaceService();
|
|
||||||
ConfigurableService configurableService = Repository.getConfigurableService(fc);
|
|
||||||
|
|
||||||
NodeRef person = Application.getCurrentUser(fc).getPerson();
|
|
||||||
if (nodeService.hasAspect(person, ContentModel.ASPECT_CONFIGURABLE) == false)
|
|
||||||
{
|
|
||||||
// create the configuration folder for this Person node
|
|
||||||
configurableService.makeConfigurable(person);
|
|
||||||
}
|
|
||||||
|
|
||||||
// target of the assoc is the configurations folder ref
|
|
||||||
NodeRef configRef = configurableService.getConfigurationFolder(person);
|
|
||||||
if (configRef == null)
|
|
||||||
{
|
|
||||||
throw new IllegalStateException("Unable to find associated 'configurations' folder for node: " + person);
|
|
||||||
}
|
|
||||||
|
|
||||||
String xpath = NamespaceService.APP_MODEL_PREFIX + ":" + "preferences";
|
|
||||||
List<NodeRef> nodes = searchService.selectNodes(
|
|
||||||
configRef,
|
|
||||||
xpath,
|
|
||||||
null,
|
|
||||||
namespaceService,
|
|
||||||
false);
|
|
||||||
|
|
||||||
NodeRef prefRef;
|
|
||||||
if (nodes.size() == 1)
|
|
||||||
{
|
|
||||||
prefRef = nodes.get(0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// create the preferences Node for this user
|
|
||||||
ChildAssociationRef childRef = nodeService.createNode(
|
|
||||||
configRef,
|
|
||||||
ContentModel.ASSOC_CONTAINS,
|
|
||||||
QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "preferences"),
|
|
||||||
ContentModel.TYPE_CMOBJECT);
|
|
||||||
|
|
||||||
prefRef = childRef.getChildRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.preferencesFolderRef = prefRef;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.preferencesFolderRef;
|
// target of the assoc is the configurations folder ref
|
||||||
|
NodeRef configRef = configurableService.getConfigurationFolder(person);
|
||||||
|
if (configRef == null)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("Unable to find associated 'configurations' folder for node: " + person);
|
||||||
|
}
|
||||||
|
|
||||||
|
String xpath = NamespaceService.APP_MODEL_PREFIX + ":" + "preferences";
|
||||||
|
List<NodeRef> nodes = searchService.selectNodes(
|
||||||
|
configRef,
|
||||||
|
xpath,
|
||||||
|
null,
|
||||||
|
namespaceService,
|
||||||
|
false);
|
||||||
|
|
||||||
|
NodeRef prefRef;
|
||||||
|
if (nodes.size() == 1)
|
||||||
|
{
|
||||||
|
prefRef = nodes.get(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// create the preferences Node for this user
|
||||||
|
ChildAssociationRef childRef = nodeService.createNode(
|
||||||
|
configRef,
|
||||||
|
ContentModel.ASSOC_CONTAINS,
|
||||||
|
QName.createQName(NamespaceService.APP_MODEL_1_0_URI, "preferences"),
|
||||||
|
ContentModel.TYPE_CMOBJECT);
|
||||||
|
|
||||||
|
prefRef = childRef.getChildRef();
|
||||||
|
}
|
||||||
|
|
||||||
|
return prefRef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -59,6 +59,7 @@ public class UsersBean implements IContextListener
|
|||||||
private static final String ERROR_USER_DELETE = "error_delete_user_object";
|
private static final String ERROR_USER_DELETE = "error_delete_user_object";
|
||||||
|
|
||||||
private static final String DEFAULT_OUTCOME = "manageUsers";
|
private static final String DEFAULT_OUTCOME = "manageUsers";
|
||||||
|
private static final String DIALOG_CLOSE = "dialog:close";
|
||||||
|
|
||||||
/** NodeService bean reference */
|
/** NodeService bean reference */
|
||||||
protected NodeService nodeService;
|
protected NodeService nodeService;
|
||||||
@@ -81,6 +82,7 @@ public class UsersBean implements IContextListener
|
|||||||
private List<Node> users = Collections.<Node>emptyList();
|
private List<Node> users = Collections.<Node>emptyList();
|
||||||
|
|
||||||
private String password = null;
|
private String password = null;
|
||||||
|
private String oldPassword = null;
|
||||||
private String confirm = null;
|
private String confirm = null;
|
||||||
private String searchCriteria = null;
|
private String searchCriteria = null;
|
||||||
|
|
||||||
@@ -209,6 +211,22 @@ public class UsersBean implements IContextListener
|
|||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the old password.
|
||||||
|
*/
|
||||||
|
public String getOldPassword()
|
||||||
|
{
|
||||||
|
return this.oldPassword;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param oldPassword The old password to set.
|
||||||
|
*/
|
||||||
|
public void setOldPassword(String oldPassword)
|
||||||
|
{
|
||||||
|
this.oldPassword = oldPassword;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Returns the person context.
|
* @return Returns the person context.
|
||||||
*/
|
*/
|
||||||
@@ -313,7 +331,7 @@ public class UsersBean implements IContextListener
|
|||||||
.getCurrentInstance(), ERROR_DELETE), e.getMessage()), e);
|
.getCurrentInstance(), ERROR_DELETE), e.getMessage()), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return DEFAULT_OUTCOME;
|
return DIALOG_CLOSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -321,7 +339,7 @@ public class UsersBean implements IContextListener
|
|||||||
*/
|
*/
|
||||||
public String changePasswordOK()
|
public String changePasswordOK()
|
||||||
{
|
{
|
||||||
String outcome = DEFAULT_OUTCOME;
|
String outcome = DIALOG_CLOSE;
|
||||||
|
|
||||||
if (this.password != null && this.confirm != null && this.password.equals(this.confirm))
|
if (this.password != null && this.confirm != null && this.password.equals(this.confirm))
|
||||||
{
|
{
|
||||||
@@ -347,6 +365,39 @@ public class UsersBean implements IContextListener
|
|||||||
return outcome;
|
return outcome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action handler called for OK button press on Change My Password screen
|
||||||
|
* For this screen the user is required to enter their old password - effectively login.
|
||||||
|
*/
|
||||||
|
public String changeMyPasswordOK()
|
||||||
|
{
|
||||||
|
String outcome = DIALOG_CLOSE;
|
||||||
|
|
||||||
|
if (this.password != null && this.confirm != null && this.password.equals(this.confirm))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String userName = (String)this.person.getProperties().get(ContentModel.PROP_USERNAME);
|
||||||
|
this.authenticationService.updateAuthentication(userName, this.oldPassword.toCharArray(), this.password.toCharArray());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
outcome = null;
|
||||||
|
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext
|
||||||
|
.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outcome = null;
|
||||||
|
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(),
|
||||||
|
ERROR_PASSWORD_MATCH));
|
||||||
|
}
|
||||||
|
|
||||||
|
return outcome;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event handler called when the user wishes to search for a user
|
* Event handler called when the user wishes to search for a user
|
||||||
*
|
*
|
||||||
|
@@ -77,13 +77,17 @@
|
|||||||
</navigation-case>
|
</navigation-case>
|
||||||
</navigation-rule>
|
</navigation-rule>
|
||||||
|
|
||||||
<!-- rule to get back to the Admin Console from anywhere -->
|
<!-- rule to get back to the Admin/User Console from anywhere -->
|
||||||
<navigation-rule>
|
<navigation-rule>
|
||||||
<from-view-id>/jsp/*</from-view-id>
|
<from-view-id>/jsp/*</from-view-id>
|
||||||
<navigation-case>
|
<navigation-case>
|
||||||
<from-outcome>adminConsole</from-outcome>
|
<from-outcome>adminConsole</from-outcome>
|
||||||
<to-view-id>/jsp/admin/admin-console.jsp</to-view-id>
|
<to-view-id>/jsp/admin/admin-console.jsp</to-view-id>
|
||||||
</navigation-case>
|
</navigation-case>
|
||||||
|
<navigation-case>
|
||||||
|
<from-outcome>userConsole</from-outcome>
|
||||||
|
<to-view-id>/jsp/users/user-console.jsp</to-view-id>
|
||||||
|
</navigation-case>
|
||||||
</navigation-rule>
|
</navigation-rule>
|
||||||
|
|
||||||
<!-- Browse screen action outcomes -->
|
<!-- Browse screen action outcomes -->
|
||||||
@@ -600,6 +604,15 @@
|
|||||||
</navigation-case>
|
</navigation-case>
|
||||||
</navigation-rule>
|
</navigation-rule>
|
||||||
|
|
||||||
|
<!-- User Details and preferences action outcomes -->
|
||||||
|
<navigation-rule>
|
||||||
|
<from-view-id>/jsp/users/user-console.jsp</from-view-id>
|
||||||
|
<navigation-case>
|
||||||
|
<from-outcome>changePassword</from-outcome>
|
||||||
|
<to-view-id>/jsp/users/change-my-password.jsp</to-view-id>
|
||||||
|
</navigation-case>
|
||||||
|
</navigation-rule>
|
||||||
|
|
||||||
<!-- navigation rules for the New User wizard -->
|
<!-- navigation rules for the New User wizard -->
|
||||||
<navigation-rule>
|
<navigation-rule>
|
||||||
<from-view-id>/jsp/wizard/new-user/*</from-view-id>
|
<from-view-id>/jsp/wizard/new-user/*</from-view-id>
|
||||||
|
BIN
source/web/images/icons/user_console.gif
Normal file
BIN
source/web/images/icons/user_console.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
BIN
source/web/images/icons/user_console_large.gif
Normal file
BIN
source/web/images/icons/user_console_large.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@@ -98,13 +98,13 @@
|
|||||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "ballongrey", "#EEEEEE"); %>
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "ballongrey", "#EEEEEE"); %>
|
||||||
<table cellpadding="6" cellspacing="6" border="0" width="100%">
|
<table cellpadding="6" cellspacing="6" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.manage_users}" image="/images/icons/users.gif" action="manageUsers" styleClass="title" actionListener="#{NewUserWizard.setupUsers}" /></td>
|
<td><a:actionLink value="#{msg.manage_users}" image="/images/icons/users.gif" action="dialog:manageUsers" styleClass="title" actionListener="#{NewUserWizard.setupUsers}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.manage_groups}" image="/images/icons/group.gif" action="manageGroups" styleClass="title" /></td>
|
<td><a:actionLink value="#{msg.manage_groups}" image="/images/icons/group.gif" action="dialog:manageGroups" styleClass="title" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.category_management}" image="/images/icons/categories.gif" action="manageCategories" styleClass="title" /></td>
|
<td><a:actionLink value="#{msg.category_management}" image="/images/icons/categories.gif" action="dialog:manageCategories" styleClass="title" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.system_info}" image="/images/icons/info_icon.gif" action="showSystemInfo" styleClass="title" /></td>
|
<td><a:actionLink value="#{msg.system_info}" image="/images/icons/info_icon.gif" action="dialog:showSystemInfo" styleClass="title" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.node_browser}" image="/images/icons/node_browser.gif" action="showNodeBrowser" styleClass="title" /></td>
|
<td><a:actionLink value="#{msg.node_browser}" image="/images/icons/node_browser.gif" action="dialog:showNodeBrowser" styleClass="title" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
<table cellpadding="1" cellspacing="1" border="0">
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.close}" action="browse" styleClass="wizardButton" />
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -137,11 +137,6 @@
|
|||||||
<%-- More actions menu --%>
|
<%-- More actions menu --%>
|
||||||
<a:menu id="actionsMenu" itemSpacing="4" label="#{msg.more_actions}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
|
<a:menu id="actionsMenu" itemSpacing="4" label="#{msg.more_actions}" image="/images/icons/menu.gif" menuStyleClass="moreActionsMenu" style="white-space:nowrap">
|
||||||
<r:actions id="acts_browse" value="browse_actions_menu" context="#{NavigationBean.currentNode}" />
|
<r:actions id="acts_browse" value="browse_actions_menu" context="#{NavigationBean.currentNode}" />
|
||||||
|
|
||||||
<%-- admin user only actions --%>
|
|
||||||
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin == true}" id="eval8">
|
|
||||||
<a:actionLink value="#{msg.admin_console}" image="/images/icons/admin_console.gif" action="adminConsole" id="link11" />
|
|
||||||
</a:booleanEvaluator>
|
|
||||||
</a:menu>
|
</a:menu>
|
||||||
</td>
|
</td>
|
||||||
</a:panel>
|
</a:panel>
|
||||||
|
@@ -189,7 +189,7 @@
|
|||||||
<table cellpadding="1" cellspacing="1" border="0">
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.close}" action="adminConsole" styleClass="wizardButton" />
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -151,7 +151,7 @@
|
|||||||
<table cellpadding="1" cellspacing="1" border="0">
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.close}" action="adminConsole" styleClass="wizardButton" />
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -270,7 +270,7 @@
|
|||||||
<table cellpadding="1" cellspacing="1" border="0">
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.close}" action="adminConsole" styleClass="wizardButton" />
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
<a:listItem value="company" label="#{msg.company_home}" rendered="#{NavigationBean.companyHomeVisible}" />
|
<a:listItem value="company" label="#{msg.company_home}" rendered="#{NavigationBean.companyHomeVisible}" />
|
||||||
<a:listItem value="home" label="#{msg.my_home}" />
|
<a:listItem value="home" label="#{msg.my_home}" />
|
||||||
<a:listItem value="guest" label="#{msg.guest_home}" rendered="#{NavigationBean.isGuest == false && NavigationBean.guestHomeVisible}" />
|
<a:listItem value="guest" label="#{msg.guest_home}" rendered="#{NavigationBean.isGuest == false && NavigationBean.guestHomeVisible}" />
|
||||||
|
<a:listItem value="myalfresco" label="#{msg.my_alfresco}" />
|
||||||
</a:modeList>
|
</a:modeList>
|
||||||
</td>
|
</td>
|
||||||
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_end.gif" width=8 height=30></td>
|
<td><img src="<%=request.getContextPath()%>/images/parts/titlebar_end.gif" width=8 height=30></td>
|
||||||
@@ -42,10 +43,23 @@
|
|||||||
<td>
|
<td>
|
||||||
<table cellspacing=2 cellpadding=0 width=100%>
|
<table cellspacing=2 cellpadding=0 width=100%>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.toggle_shelf}" image="/images/icons/shelf.gif" actionListener="#{NavigationBean.toggleShelf}" showLink="false" /></td>
|
<td>
|
||||||
|
<%-- admin user only actions --%>
|
||||||
|
<a:booleanEvaluator value="#{NavigationBean.currentUser.admin == true}" id="evalA">
|
||||||
|
<a:actionLink value="#{msg.admin_console}" image="/images/icons/admin_console.gif" showLink="false" action="dialog:adminConsole" id="link11_1" />
|
||||||
|
</a:booleanEvaluator>
|
||||||
|
</td>
|
||||||
<td width=8> </td>
|
<td width=8> </td>
|
||||||
<td><img src="<%=request.getContextPath()%>/images/icons/Help_icon.gif" width=15 height=15></td>
|
<td>
|
||||||
<td><nobr><h:outputLink value="#{NavigationBean.helpUrl}" target="help"><h:outputText value="#{msg.help}" /></h:outputLink></nobr></td>
|
<%-- user preferences --%>
|
||||||
|
<a:actionLink value="#{msg.user_console}" image="/images/icons/user_console.gif" showLink="false" action="dialog:userConsole" actionListener="#{UsersBean.setupUserAction}" id="link11_2">
|
||||||
|
<f:param name="id" value="#{NavigationBean.currentUser.person.id}" />
|
||||||
|
</a:actionLink>
|
||||||
|
</td>
|
||||||
|
<td width=8> </td>
|
||||||
|
<td><a:actionLink value="#{msg.toggle_shelf}" image="/images/icons/shelf.gif" showLink="false" actionListener="#{NavigationBean.toggleShelf}" /></td>
|
||||||
|
<td width=8> </td>
|
||||||
|
<td><a:actionLink value="#{msg.help}" image="/images/icons/Help_icon.gif" showLink="false" href="#{NavigationBean.helpUrl}" target="help" /></td>
|
||||||
<td width=8> </td>
|
<td width=8> </td>
|
||||||
<td><nobr><a href="http://www.alfresco.com/services/support/issues/" target="new"><h:outputText value="#{msg.raise_issue}" /></a></nobr></td>
|
<td><nobr><a href="http://www.alfresco.com/services/support/issues/" target="new"><h:outputText value="#{msg.raise_issue}" /></a></nobr></td>
|
||||||
<td width=8> </td>
|
<td width=8> </td>
|
||||||
|
205
source/web/jsp/users/change-my-password.jsp
Normal file
205
source/web/jsp/users/change-my-password.jsp
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<%--
|
||||||
|
Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
|
||||||
|
Licensed under the Mozilla Public License version 1.1
|
||||||
|
with a permitted attribution clause. You may obtain a
|
||||||
|
copy of the License at
|
||||||
|
|
||||||
|
http://www.alfresco.org/legal/license.txt
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the
|
||||||
|
License.
|
||||||
|
--%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||||
|
|
||||||
|
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||||
|
<%@ page isELIgnored="false" %>
|
||||||
|
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||||
|
|
||||||
|
<r:page titleId="title_change_password">
|
||||||
|
|
||||||
|
<script language="JavaScript1.2">
|
||||||
|
|
||||||
|
window.onload = pageLoaded;
|
||||||
|
|
||||||
|
function pageLoaded()
|
||||||
|
{
|
||||||
|
document.getElementById("edit-my-pass:old-password").focus();
|
||||||
|
updateButtonState();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateButtonState()
|
||||||
|
{
|
||||||
|
if (document.getElementById("edit-my-pass:password").value.length == 0 ||
|
||||||
|
document.getElementById("edit-my-pass:old-password").value.length == 0 ||
|
||||||
|
document.getElementById("edit-my-pass:confirm").value.length == 0)
|
||||||
|
{
|
||||||
|
document.getElementById("edit-my-pass:ok-button").disabled = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("edit-my-pass:ok-button").disabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<f:view>
|
||||||
|
|
||||||
|
<%-- load a bundle of properties with I18N strings --%>
|
||||||
|
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||||
|
|
||||||
|
<%-- set the form name here --%>
|
||||||
|
<h:form acceptCharset="UTF-8" id="edit-my-pass">
|
||||||
|
|
||||||
|
<%-- Main outer table --%>
|
||||||
|
<table cellspacing="0" cellpadding="2">
|
||||||
|
|
||||||
|
<%-- Title bar --%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<%@ include file="../parts/titlebar.jsp" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- Main area --%>
|
||||||
|
<tr valign="top">
|
||||||
|
<%-- Shelf --%>
|
||||||
|
<td>
|
||||||
|
<%@ include file="../parts/shelf.jsp" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<%-- Work Area --%>
|
||||||
|
<td width="100%">
|
||||||
|
<table cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
<%-- Breadcrumb --%>
|
||||||
|
<%@ include file="../parts/breadcrumb.jsp" %>
|
||||||
|
|
||||||
|
<%-- Status and Actions --%>
|
||||||
|
<tr>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
|
||||||
|
<td bgcolor="#EEEEEE">
|
||||||
|
|
||||||
|
<%-- Status and Actions inner contents table --%>
|
||||||
|
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
|
||||||
|
<table cellspacing="4" cellpadding="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="32">
|
||||||
|
<h:graphicImage id="wizard-logo" url="/images/icons/edituser_large.gif" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="mainTitle"><h:outputText value="#{msg.change_password}" /></div>
|
||||||
|
<div class="mainSubText"><h:outputText value="#{msg.change_my_password_description}" /></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- separator row with gradient shadow --%>
|
||||||
|
<tr>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- Details --%>
|
||||||
|
<tr valign=top>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
|
||||||
|
<td>
|
||||||
|
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width="100%" valign="top">
|
||||||
|
|
||||||
|
<a:errors message="#{msg.error_wizard}" styleClass="errorMessage" />
|
||||||
|
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
|
||||||
|
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><h:outputText value="#{msg.change_my_password_instructions}" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="2" class="paddingRow"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td><h:outputText value="#{msg.username}"/>:</td>
|
||||||
|
<td>
|
||||||
|
<h:outputText value="#{UsersBean.person.properties.userName}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><h:outputText value="#{msg.old_password}"/>:</td>
|
||||||
|
<td>
|
||||||
|
<h:inputSecret id="old-password" value="#{UsersBean.oldPassword}" size="35" maxlength="1024" validator="#{LoginBean.validatePassword}" onkeyup="updateButtonState();" onchange="updateButtonState();" redisplay="true" /> *
|
||||||
|
<h:message id="errors0" for="old-password" style="color:red" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><h:outputText value="#{msg.new_password}"/>:</td>
|
||||||
|
<td>
|
||||||
|
<h:inputSecret id="password" value="#{UsersBean.password}" size="35" maxlength="1024" validator="#{LoginBean.validatePassword}" onkeyup="updateButtonState();" onchange="updateButtonState();" redisplay="true" /> *
|
||||||
|
<h:message id="errors1" for="password" style="color:red" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><h:outputText value="#{msg.confirm}"/>:</td>
|
||||||
|
<td>
|
||||||
|
<h:inputSecret id="confirm" value="#{UsersBean.confirm}" size="35" maxlength="1024" validator="#{LoginBean.validatePassword}" onkeyup="updateButtonState();" onchange="updateButtonState();" redisplay="true" /> *
|
||||||
|
<h:message id="errors2" for="confirm" style="color:red" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td valign="top">
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
|
||||||
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton value="#{msg.finish_button}" id="ok-button" action="#{UsersBean.changeMyPasswordOK}" styleClass="wizardButton" disabled="true" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td class="wizardButtonSpacing"></td></tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton value="#{msg.cancel_button}" action="dialog:close" styleClass="wizardButton" immediate="true" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- separator row with bottom panel graphics --%>
|
||||||
|
<tr>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
|
||||||
|
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
</f:view>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
updateButtonState();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</r:page>
|
@@ -162,7 +162,7 @@
|
|||||||
<tr><td class="wizardButtonSpacing"></td></tr>
|
<tr><td class="wizardButtonSpacing"></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.cancel_button}" action="cancel" styleClass="wizardButton" immediate="true" />
|
<h:commandButton value="#{msg.cancel_button}" action="dialog:close" styleClass="wizardButton" immediate="true" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@@ -126,7 +126,7 @@
|
|||||||
<tr><td class="dialogButtonSpacing"></td></tr>
|
<tr><td class="dialogButtonSpacing"></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.no}" action="manageUsers" styleClass="dialogControls" />
|
<h:commandButton value="#{msg.no}" action="dialog:close" styleClass="dialogControls" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
188
source/web/jsp/users/user-console.jsp
Normal file
188
source/web/jsp/users/user-console.jsp
Normal file
@@ -0,0 +1,188 @@
|
|||||||
|
<%--
|
||||||
|
Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
|
||||||
|
Licensed under the Mozilla Public License version 1.1
|
||||||
|
with a permitted attribution clause. You may obtain a
|
||||||
|
copy of the License at
|
||||||
|
|
||||||
|
http://www.alfresco.org/legal/license.txt
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
either express or implied. See the License for the specific
|
||||||
|
language governing permissions and limitations under the
|
||||||
|
License.
|
||||||
|
--%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||||
|
|
||||||
|
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||||
|
<%@ page isELIgnored="false" %>
|
||||||
|
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||||
|
|
||||||
|
<r:page titleId="title_user_console">
|
||||||
|
|
||||||
|
<f:view>
|
||||||
|
|
||||||
|
<%-- load a bundle of properties with I18N strings --%>
|
||||||
|
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||||
|
|
||||||
|
<h:form acceptCharset="UTF-8" id="user-console">
|
||||||
|
|
||||||
|
<%-- Main outer table --%>
|
||||||
|
<table cellspacing="0" cellpadding="2">
|
||||||
|
|
||||||
|
<%-- Title bar --%>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<%@ include file="../parts/titlebar.jsp" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- Main area --%>
|
||||||
|
<tr valign="top">
|
||||||
|
<%-- Shelf --%>
|
||||||
|
<td>
|
||||||
|
<%@ include file="../parts/shelf.jsp" %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<%-- Work Area --%>
|
||||||
|
<td width="100%">
|
||||||
|
<table cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
<%-- Breadcrumb --%>
|
||||||
|
<%@ include file="../parts/breadcrumb.jsp" %>
|
||||||
|
|
||||||
|
<%-- Status and Actions --%>
|
||||||
|
<tr>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
|
||||||
|
<td bgcolor="#EEEEEE">
|
||||||
|
|
||||||
|
<%-- Status and Actions inner contents table --%>
|
||||||
|
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
|
||||||
|
<table cellspacing="4" cellpadding="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td width=32>
|
||||||
|
<h:graphicImage id="logo" url="/images/icons/user_console_large.gif" width="32" height="32" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="mainTitle"><h:outputText value="#{msg.user_console_info}" /></div>
|
||||||
|
<div class="mainSubText"><h:outputText value="#{msg.user_console_description}" /></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- separator row with gradient shadow --%>
|
||||||
|
<tr>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- Details --%>
|
||||||
|
<tr valign=top>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
|
||||||
|
<td valign=top>
|
||||||
|
|
||||||
|
<table cellspacing=0 cellpadding=3 border=0 width=100%>
|
||||||
|
<tr>
|
||||||
|
<td width="100%" valign="top">
|
||||||
|
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||||
|
<h:panelGroup id="mydetails-panel-facets">
|
||||||
|
<f:facet name="title">
|
||||||
|
<%--<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalChange">--%>
|
||||||
|
<a:actionLink id="actModify1" value="#{msg.modify}" action="" showLink="false" image="/images/icons/Change_details.gif" />
|
||||||
|
<%--</r:permissionEvaluator>--%>
|
||||||
|
</f:facet>
|
||||||
|
</h:panelGroup>
|
||||||
|
<a:panel label="#{msg.my_details}" id="mydetails-panel" progressive="true" facetsId="mydetails-panel-facets"
|
||||||
|
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||||
|
<table cellspacing=2 cellpadding=2 border=0>
|
||||||
|
<tr>
|
||||||
|
<td class="propertiesLabel">
|
||||||
|
<h:outputText value="#{msg.first_name}" />:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<h:outputText value="#{UsersBean.person.properties.firstName}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="propertiesLabel">
|
||||||
|
<h:outputText value="#{msg.last_name}" />:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<h:outputText value="#{UsersBean.person.properties.lastName}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="propertiesLabel">
|
||||||
|
<h:outputText value="#{msg.email}" />:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<h:outputText value="#{UsersBean.person.properties.email}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div style="padding:4px"></div>
|
||||||
|
<%-- context for current user is setup on entry to user console --%>
|
||||||
|
<a:actionLink id="change-password" value="#{msg.change_password}" action="dialog:changePassword" image="/images/icons/change_password.gif" />
|
||||||
|
</a:panel>
|
||||||
|
<div style="padding:4px"></div>
|
||||||
|
|
||||||
|
<h:panelGroup id="pref-panel-facets">
|
||||||
|
<f:facet name="title">
|
||||||
|
<%--<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="evalChange">--%>
|
||||||
|
<a:actionLink id="actModify2" value="#{msg.modify}" action="" showLink="false" image="/images/icons/Change_details.gif" />
|
||||||
|
<%--</r:permissionEvaluator>--%>
|
||||||
|
</f:facet>
|
||||||
|
</h:panelGroup>
|
||||||
|
<a:panel label="#{msg.general_pref}" id="pref-panel" progressive="true" facetsId="pref-panel-facets"
|
||||||
|
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||||
|
<table width=100% cellspacing=2 cellpadding=2 border=0>
|
||||||
|
</table>
|
||||||
|
</a:panel>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td valign="top">
|
||||||
|
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
|
||||||
|
<table cellpadding="1" cellspacing="1" border="0">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<%-- separator row with bottom panel graphics --%>
|
||||||
|
<tr>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
|
||||||
|
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
|
||||||
|
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
</f:view>
|
||||||
|
|
||||||
|
</r:page>
|
@@ -189,11 +189,11 @@
|
|||||||
<a:actionLink value="#{msg.modify}" image="/images/icons/edituser.gif" showLink="false" action="editUser" actionListener="#{NewUserWizard.startWizardForEdit}">
|
<a:actionLink value="#{msg.modify}" image="/images/icons/edituser.gif" showLink="false" action="editUser" actionListener="#{NewUserWizard.startWizardForEdit}">
|
||||||
<f:param name="id" value="#{r.id}" />
|
<f:param name="id" value="#{r.id}" />
|
||||||
</a:actionLink>
|
</a:actionLink>
|
||||||
<a:actionLink value="#{msg.change_password}" image="/images/icons/change_password.gif" showLink="false" action="changePassword" actionListener="#{UsersBean.setupUserAction}">
|
<a:actionLink value="#{msg.change_password}" image="/images/icons/change_password.gif" showLink="false" action="dialog:changePassword" actionListener="#{UsersBean.setupUserAction}">
|
||||||
<f:param name="id" value="#{r.id}" />
|
<f:param name="id" value="#{r.id}" />
|
||||||
</a:actionLink>
|
</a:actionLink>
|
||||||
<a:booleanEvaluator value="#{r.userName != 'admin'}">
|
<a:booleanEvaluator value="#{r.userName != 'admin'}">
|
||||||
<a:actionLink value="#{msg.delete}" image="/images/icons/delete_person.gif" showLink="false" action="deleteUser" actionListener="#{UsersBean.setupUserAction}">
|
<a:actionLink value="#{msg.delete}" image="/images/icons/delete_person.gif" showLink="false" action="dialog:deleteUser" actionListener="#{UsersBean.setupUserAction}">
|
||||||
<f:param name="id" value="#{r.id}" />
|
<f:param name="id" value="#{r.id}" />
|
||||||
</a:actionLink>
|
</a:actionLink>
|
||||||
</a:booleanEvaluator>
|
</a:booleanEvaluator>
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
<table cellpadding="0" cellspacing="0" border="0">
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<h:commandButton value="#{msg.close}" action="adminConsole" styleClass="wizardButton" />
|
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
Reference in New Issue
Block a user