mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
Added permission model bootstrap bean, added mediaWiki cusomt permission model, updated UI wizards to use custom permission models for derived types, added PHP mimetype
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8303 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
213f696b97
commit
ee7843b2f1
@ -113,6 +113,14 @@
|
|||||||
<ref bean="dictionaryService" />
|
<ref bean="dictionaryService" />
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<!-- =========================== -->
|
||||||
|
<!-- Permissions Model Bootstrap -->
|
||||||
|
<!-- =========================== -->
|
||||||
|
|
||||||
|
<bean id="permissionModelBootstrap" class="org.alfresco.repo.security.permissions.impl.model.PermissionModelBootstrap" abstract="true" init-method="init">
|
||||||
|
<property name="permissionModel" ref="permissionsModelDAO"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
<!-- ====== -->
|
<!-- ====== -->
|
||||||
<!-- Voters -->
|
<!-- Voters -->
|
||||||
|
@ -157,6 +157,16 @@ public class PermissionModel implements ModelDAO, InitializingBean
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public void afterPropertiesSet()
|
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);
|
Document document = createDocument(model);
|
||||||
Element root = document.getRootElement();
|
Element root = document.getRootElement();
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user