diff --git a/config/alfresco/public-services-security-context.xml b/config/alfresco/public-services-security-context.xml
index 9739681b41..6d019ee03d 100644
--- a/config/alfresco/public-services-security-context.xml
+++ b/config/alfresco/public-services-security-context.xml
@@ -113,6 +113,14 @@
+
+
+
+
+
+
+
+
diff --git a/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModel.java b/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModel.java
index 867647bc09..3aa69f0a27 100644
--- a/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModel.java
+++ b/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModel.java
@@ -157,6 +157,16 @@ public class PermissionModel implements ModelDAO, InitializingBean
*/
public void afterPropertiesSet()
+ {
+ addPermissionModel(this.model);
+ }
+
+ /**
+ * Adds a permission model
+ *
+ * @param model path to the permission model to add
+ */
+ public void addPermissionModel(String model)
{
Document document = createDocument(model);
Element root = document.getRootElement();
diff --git a/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModelBootstrap.java b/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModelBootstrap.java
new file mode 100644
index 0000000000..4f8bc40ded
--- /dev/null
+++ b/source/java/org/alfresco/repo/security/permissions/impl/model/PermissionModelBootstrap.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2005-2007 Alfresco Software Limited.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ * As a special exception to the terms and conditions of version 2.0 of
+ * the GPL, you may redistribute this Program in connection with Free/Libre
+ * and Open Source Software ("FLOSS") applications as described in Alfresco's
+ * FLOSS exception. You should have recieved a copy of the text describing
+ * the FLOSS exception, and it is also available here:
+ * http://www.alfresco.com/legal/licensing"
+ */
+package org.alfresco.repo.security.permissions.impl.model;
+
+/**
+ * Bootstrap bean used to add additional permission models
+ *
+ * @author Roy Wetherall
+ */
+public class PermissionModelBootstrap
+{
+ /** Permission model */
+ private PermissionModel permissionModel;
+
+ /** Path to the permission model */
+ private String model;
+
+ /**
+ * Set the permission model
+ *
+ * @param permissionModel the permission model
+ */
+ public void setPermissionModel(PermissionModel permissionModel)
+ {
+ this.permissionModel = permissionModel;
+ }
+
+ /**
+ * Sets the path to the permission model
+ *
+ * @param model path to the permission model
+ */
+ public void setModel(String model)
+ {
+ this.model = model;
+ }
+
+ /**
+ * Initialise method that adds the permission models
+ */
+ public void init()
+ {
+ // Initialise the permission model
+ this.permissionModel.addPermissionModel(this.model);
+ }
+}