Index: config/src/main/resources/cms-services.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- config/src/main/resources/cms-services.xml	(revision 34494)
+++ config/src/main/resources/cms-services.xml	(revision )
@@ -33,6 +33,14 @@
       <sv:value>org.hippoecm.frontend.service.preferences.PreferencesStorePlugin</sv:value>
     </sv:property>
   </sv:node>
+  <sv:node sv:name="systemPreferencesStoreService">
+    <sv:property sv:name="jcr:primaryType" sv:type="Name">
+      <sv:value>frontend:plugin</sv:value>
+    </sv:property>
+    <sv:property sv:name="plugin.class" sv:type="String">
+      <sv:value>org.hippoecm.frontend.service.preferences.SystemPreferencesStorePlugin</sv:value>
+    </sv:property>
+  </sv:node>
   
   <sv:node sv:name="settingsService">
     <sv:property sv:name="jcr:primaryType" sv:type="Name">
Index: perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.html
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.html	(revision 34494)
+++ perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.html	(revision )
@@ -23,7 +23,7 @@
         <wicket:message key="user-view-actions-title"/>
     </h3>
     <ul class="hippo-controlpanel-options">
-        <li><a href="#" wicket:id="create-user">
+        <li wicket:id="user-create-button-container"><a href="#" wicket:id="create-user">
             <wicket:message key="user-create"/>
         </a></li>
         <li>
\ No newline at end of file
Index: perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.java	(revision 34494)
+++ perspectives/src/main/java/org/hippoecm/frontend/plugins/cms/admin/users/ListUsersPanel.java	(revision )
@@ -29,6 +29,7 @@
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.TextField;
@@ -48,13 +49,14 @@
 import org.hippoecm.frontend.plugins.cms.admin.widgets.AjaxLinkLabel;
 import org.hippoecm.frontend.plugins.cms.admin.widgets.DefaultFocusBehavior;
 import org.hippoecm.frontend.plugins.standards.panelperspective.breadcrumb.PanelPluginBreadCrumbLink;
+import org.hippoecm.frontend.service.preferences.ISystemPreferencesStore;
 
 /**
  * This panel displays a pageable, searchable list of users.
  */
 public class ListUsersPanel extends AdminBreadCrumbPanel {
     @SuppressWarnings("unused")
-    private static final String SVN_ID = "$Id: ListUsersPanel.java 34169 2012-04-19 08:57:32Z ecausarano $";
+    private static final String SVN_ID = "$Id: ListUsersPanel.java 33680 2012-03-23 18:55:58Z wdanes $";
     private static final long serialVersionUID = 1L;
 
     private static final int NUMBER_OF_ITEMS_PER_PAGE = 20;
@@ -63,6 +65,7 @@
     private final AdminDataTable table;
     private final UserDataProvider userDataProvider;
     private Observer userDataProviderObserver;
+    private ISystemPreferencesStore systemPreferencesStore;
 
     /**
      * Constructs a new ListUsersPanel.
@@ -73,21 +76,31 @@
      * @param userDataProvider the userDataProvider
      */
     public ListUsersPanel(final String id, final IPluginContext context, final IBreadCrumbModel breadCrumbModel,
-            final UserDataProvider userDataProvider) {
+                          final UserDataProvider userDataProvider) {
         super(id, breadCrumbModel);
 
         setOutputMarkupId(true);
-
         this.context = context;
         this.userDataProvider = userDataProvider;
         userDataProvider.setDirty();
 
-        add(new PanelPluginBreadCrumbLink("create-user", breadCrumbModel) {
+        systemPreferencesStore = context.getService(ISystemPreferencesStore.SERVICE_ID, ISystemPreferencesStore.class);
+
+        boolean createUserLinkEnabled = systemPreferencesStore.getBoolean("admin-user-panel", "userCreationEnabled",true);
+
+        PanelPluginBreadCrumbLink createUserLink = new PanelPluginBreadCrumbLink("create-user", breadCrumbModel) {
             @Override
             protected IBreadCrumbParticipant getParticipant(final String componentId) {
                 return new CreateUserPanel(componentId, breadCrumbModel, context);
             }
-        });
+        };
+        createUserLink.setVisible(createUserLinkEnabled);
+
+        WebMarkupContainer createButtonContainer = new WebMarkupContainer("user-create-button-container");
+        createButtonContainer.setVisible(createUserLinkEnabled);
+        createButtonContainer.add(createUserLink);
+        add(createButtonContainer);
+
 
         List<IColumn> columns = new ArrayList<IColumn>();
 
@@ -95,7 +108,7 @@
             private static final long serialVersionUID = 1L;
 
             public void populateItem(final Item<ICellPopulator<User>> item,
-                    final String componentId, final IModel<User> model) {
+                                     final String componentId, final IModel<User> model) {
 
                 ViewUserLinkLabel action = new ViewUserLinkLabel(componentId, model, ListUsersPanel.this, context);
                 item.add(action);
@@ -112,7 +125,7 @@
         columns.add(new AbstractColumn<User>(new ResourceModel("user-group")) {
             @Override
             public void populateItem(final Item<ICellPopulator<User>> cellItem, final String componentId,
-                    final IModel<User> model) {
+                                     final IModel<User> model) {
                 User user = model.getObject();
                 List<Group> groups = user.getLocalMembershipsAsListOfGroups();
                 GroupsLinkListPanel groupsLinkListPanel = new GroupsLinkListPanel(
\ No newline at end of file
Index: engine/src/main/java/org/hippoecm/frontend/service/preferences/SystemPreferencesStorePlugin.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- engine/src/main/java/org/hippoecm/frontend/service/preferences/SystemPreferencesStorePlugin.java	(revision )
+++ engine/src/main/java/org/hippoecm/frontend/service/preferences/SystemPreferencesStorePlugin.java	(revision )
@@ -0,0 +1,59 @@
+package org.hippoecm.frontend.service.preferences;
+
+import java.util.Set;
+
+import org.hippoecm.frontend.plugin.IPluginContext;
+import org.hippoecm.frontend.plugin.Plugin;
+import org.hippoecm.frontend.plugin.config.IPluginConfig;
+
+/**
+ * @author Vivek Kumar
+ */
+public class SystemPreferencesStorePlugin extends Plugin implements ISystemPreferencesStore {
+
+
+    @SuppressWarnings("unused")
+    private final static String SVN_ID = "$Id$";
+
+    private static final long serialVersionUID = 7393749084914348223L;
+
+    private JcrPreferencesStore store;
+
+    public SystemPreferencesStorePlugin(IPluginContext context, IPluginConfig config) {
+        super(context, config);
+        store = new JcrPreferencesStore(context, config);
+        context.registerService(this, ISystemPreferencesStore.SERVICE_ID);
+    }
+
+    @Override
+    public String getString(final String context, final String name, final String defaultValue) {
+        return store.getString(context, name, defaultValue);
+    }
+
+    @Override
+    public int getInt(final String context, final String name, final int defaultValue) {
+        return store.getInt(context, name, defaultValue);
+    }
+
+    @Override
+    public boolean getBoolean(final String context, final String name, final boolean defaultValue) {
+        return store.getBoolean(context, name, defaultValue);
+    }
+
+    public void set(String context, String name, String value) {
+        store.set(context, name, value);
+    }
+
+    public void set(String context, String name, int value) {
+        store.set(context, name, value);
+    }
+
+    public void set(String context, String name, boolean value) {
+        store.set(context, name, value);
+    }
+
+    @Override
+    public Set<IPluginConfig> getPreferences() {
+        return store.getPreferences();
+    }
+}
Index: api/src/main/java/org/hippoecm/frontend/service/preferences/ISystemPreferencesStore.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- api/src/main/java/org/hippoecm/frontend/service/preferences/ISystemPreferencesStore.java	(revision )
+++ api/src/main/java/org/hippoecm/frontend/service/preferences/ISystemPreferencesStore.java	(revision )
@@ -0,0 +1,67 @@
+package org.hippoecm.frontend.service.preferences;
+
+import java.util.Set;
+
+import org.apache.wicket.IClusterable;
+import org.hippoecm.frontend.plugin.config.IPluginConfig;
+
+/**
+ * @author Vivek Kumar
+ */
+public interface ISystemPreferencesStore extends IClusterable {
+
+   String SERVICE_ID = "system.preferences.store.service";
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param defaultValue
+     * @return
+     */
+    String getString(String context, String name,String defaultValue);
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param defaultValue
+     * @return
+     */
+    int getInt(String context, String name, int defaultValue);
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param defaultValue
+     * @return
+     */
+    boolean getBoolean(String context, String name, boolean defaultValue);
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param value
+     */
+    void set(String context, String name, String value);
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param value
+     */
+    void set(String context, String name, int value);
+
+   /**
+     *
+     * @param context
+     * @param name
+     * @param value
+     */
+   void set(String context, String name, boolean value);
+
+   Set<IPluginConfig> getPreferences();
+}
Index: engine/src/main/java/org/hippoecm/frontend/service/preferences/JcrPreferencesStore.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- engine/src/main/java/org/hippoecm/frontend/service/preferences/JcrPreferencesStore.java	(revision )
+++ engine/src/main/java/org/hippoecm/frontend/service/preferences/JcrPreferencesStore.java	(revision )
@@ -0,0 +1,85 @@
+package org.hippoecm.frontend.service.preferences;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.wicket.Session;
+import org.hippoecm.frontend.model.IModelReference;
+import org.hippoecm.frontend.model.JcrNodeModel;
+import org.hippoecm.frontend.plugin.IPluginContext;
+import org.hippoecm.frontend.plugin.config.IPluginConfig;
+import org.hippoecm.frontend.plugin.config.impl.JavaPluginConfig;
+import org.hippoecm.frontend.plugin.config.impl.JcrPluginConfig;
+
+/**
+ * @author Vivek Kumar
+ */
+public class JcrPreferencesStore implements ISystemPreferencesStore {
+
+
+    @SuppressWarnings("unused")
+    private final static String SVN_ID = "$Id$";
+
+    private static final long serialVersionUID = 1750038688246091077L;
+
+    private JcrPluginConfig store;
+
+    public JcrPreferencesStore(final IPluginContext context, final IPluginConfig config) {
+        JcrNodeModel nodeModel = new JcrNodeModel("/hippo:configuration/hippo:frontend/cms/cms-services/systemPreferencesStoreService");
+        store = new JcrPluginConfig(nodeModel);
+    }
+
+    @Override
+    public String getString(final String context, final String name, final String defaultValue) {
+        IPluginConfig pluginConfig = getPrefs(context);
+        if (!pluginConfig.containsKey(name)) {
+            return defaultValue;
+        }
+        return pluginConfig.getString(name);
+    }
+
+    @Override
+    public int getInt(final String context, final String name, final int defaultValue) {
+        IPluginConfig pluginConfig = getPrefs(context);
+        if (!pluginConfig.containsKey(name)) {
+            return defaultValue;
+        }
+        return pluginConfig.getInt(name);
+    }
+
+    @Override
+    public boolean getBoolean(final String context, final String name, final boolean defaultValue) {
+        IPluginConfig pluginConfig = getPrefs(context);
+        if (!pluginConfig.containsKey(name)) {
+            return defaultValue;
+        }
+        return pluginConfig.getBoolean(name);
+    }
+
+    public void set(String context, String name, String value) {
+        getPrefs(context).put(name, value);
+    }
+
+    public void set(String context, String name, int value) {
+        getPrefs(context).put(name, value);
+    }
+
+    public void set(String context, String name, boolean value) {
+        getPrefs(context).put(name, value);
+    }
+
+    private IPluginConfig getPrefs(String context) {
+        if (!store.containsKey(context)) {
+            store.put(context, new JavaPluginConfig());
+        }
+        return store.getPluginConfig(context);
+    }
+
+    public Set<IPluginConfig> getPreferences() {
+        return store.getPluginConfigSet();
+    }
+}
