add model for access control list
The schema is compatible with the distributed schema of the Security component.
This commit is contained in:
parent
98bef28210
commit
f6edbe3e7b
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
/Model/*/map
|
||||
/Model/*/om
|
||||
vendor/phing/
|
||||
vendor/propel/
|
||||
vendor/symfony/
|
||||
|
|
18
Model/Acl/AclClass.php
Normal file
18
Model/Acl/AclClass.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseAclClass;
|
||||
|
||||
class AclClass extends BaseAclClass
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/AclClassPeer.php
Normal file
18
Model/Acl/AclClassPeer.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseAclClassPeer;
|
||||
|
||||
class AclClassPeer extends BaseAclClassPeer
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/AclClassQuery.php
Normal file
18
Model/Acl/AclClassQuery.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseAclClassQuery;
|
||||
|
||||
class AclClassQuery extends BaseAclClassQuery
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/Entry.php
Normal file
18
Model/Acl/Entry.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseEntry;
|
||||
|
||||
class Entry extends BaseEntry
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/EntryPeer.php
Normal file
18
Model/Acl/EntryPeer.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseEntryPeer;
|
||||
|
||||
class EntryPeer extends BaseEntryPeer
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/EntryQuery.php
Normal file
18
Model/Acl/EntryQuery.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseEntryQuery;
|
||||
|
||||
class EntryQuery extends BaseEntryQuery
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentity.php
Normal file
18
Model/Acl/ObjectIdentity.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentity;
|
||||
|
||||
class ObjectIdentity extends BaseObjectIdentity
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentityAncestor.php
Normal file
18
Model/Acl/ObjectIdentityAncestor.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentityAncestor;
|
||||
|
||||
class ObjectIdentityAncestor extends BaseObjectIdentityAncestor
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentityAncestorPeer.php
Normal file
18
Model/Acl/ObjectIdentityAncestorPeer.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentityAncestorPeer;
|
||||
|
||||
class ObjectIdentityAncestorPeer extends BaseObjectIdentityAncestorPeer
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentityAncestorQuery.php
Normal file
18
Model/Acl/ObjectIdentityAncestorQuery.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentityAncestorQuery;
|
||||
|
||||
class ObjectIdentityAncestorQuery extends BaseObjectIdentityAncestorQuery
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentityPeer.php
Normal file
18
Model/Acl/ObjectIdentityPeer.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentityPeer;
|
||||
|
||||
class ObjectIdentityPeer extends BaseObjectIdentityPeer
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/ObjectIdentityQuery.php
Normal file
18
Model/Acl/ObjectIdentityQuery.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseObjectIdentityQuery;
|
||||
|
||||
class ObjectIdentityQuery extends BaseObjectIdentityQuery
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/SecurityIdentity.php
Normal file
18
Model/Acl/SecurityIdentity.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseSecurityIdentity;
|
||||
|
||||
class SecurityIdentity extends BaseSecurityIdentity
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/SecurityIdentityPeer.php
Normal file
18
Model/Acl/SecurityIdentityPeer.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseSecurityIdentityPeer;
|
||||
|
||||
class SecurityIdentityPeer extends BaseSecurityIdentityPeer
|
||||
{
|
||||
|
||||
}
|
18
Model/Acl/SecurityIdentityQuery.php
Normal file
18
Model/Acl/SecurityIdentityQuery.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the PropelBundle package.
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @license MIT License
|
||||
*/
|
||||
|
||||
namespace Propel\PropelBundle\Model\Acl;
|
||||
|
||||
use Propel\PropelBundle\Model\Acl\om\BaseSecurityIdentityQuery;
|
||||
|
||||
class SecurityIdentityQuery extends BaseSecurityIdentityQuery
|
||||
{
|
||||
|
||||
}
|
104
Resources/config/acl_schema.xml
Normal file
104
Resources/config/acl_schema.xml
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database name="default" namespace="Propel\PropelBundle\Model\Acl" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd">
|
||||
<table name="acl_classes" phpName="AclClass">
|
||||
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
|
||||
<column name="class_type" type="varchar" size="200" required="true" phpName="Type" />
|
||||
|
||||
<unique>
|
||||
<unique-column name="class_type" />
|
||||
</unique>
|
||||
</table>
|
||||
|
||||
<table name="acl_security_identities" phpName="SecurityIdentity">
|
||||
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
|
||||
<column name="identifier" type="varchar" size="200" required="true" />
|
||||
<column name="username" type="boolean" required="true" />
|
||||
|
||||
<unique>
|
||||
<unique-column name="identifier" />
|
||||
<unique-column name="username" />
|
||||
</unique>
|
||||
</table>
|
||||
|
||||
<table name="acl_object_identities" phpName="ObjectIdentity">
|
||||
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
|
||||
<column name="class_id" type="integer" required="true" />
|
||||
<column name="object_identifier" type="varchar" size="200" required="true" phpName="Identifier" />
|
||||
<column name="parent_object_identity_id" type="integer" required="false" defaultValue="null" />
|
||||
<column name="entries_inheriting" type="boolean" required="true" defaultValue="1" />
|
||||
|
||||
<unique>
|
||||
<unique-column name="class_id" />
|
||||
<unique-column name="object_identifier" />
|
||||
</unique>
|
||||
|
||||
<index>
|
||||
<index-column name="parent_object_identity_id" />
|
||||
</index>
|
||||
|
||||
<foreign-key foreignTable="acl_classes" onDelete="RESTRICT" onUpdate="CASCADE">
|
||||
<reference local="class_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="acl_object_identities" onDelete="RESTRICT" onUpdate="RESTRICT">
|
||||
<reference local="parent_object_identity_id" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="acl_object_identity_ancestors" phpName="ObjectIdentityAncestor" heavyIndexing="true">
|
||||
<column name="object_identity_id" type="integer" primaryKey="true" />
|
||||
<column name="ancestor_id" type="integer" primaryKey="true" />
|
||||
|
||||
<foreign-key foreignTable="acl_object_identities" onDelete="CASCADE" onUpdate="CASCADE">
|
||||
<reference local="object_identity_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="acl_object_identities" onDelete="CASCADE" onUpdate="CASCADE">
|
||||
<reference local="ancestor_id" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
|
||||
<table name="acl_entries" phpName="Entry">
|
||||
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
|
||||
<column name="class_id" type="integer" required="true" />
|
||||
<column name="object_identity_id" type="integer" required="false" defaultValue="null" />
|
||||
<column name="security_identity_id" type="integer" required="true" />
|
||||
<column name="field_name" type="varchar" size="50" />
|
||||
<column name="ace_order" type="integer" required="true" />
|
||||
<column name="mask" type="integer" required="true" />
|
||||
<column name="granting" type="boolean" required="true" />
|
||||
<column name="granting_strategy" type="varchar" size="30" required="true" />
|
||||
<column name="audit_success" type="boolean" required="true" />
|
||||
<column name="audit_failure" type="boolean" required="true" />
|
||||
|
||||
<unique>
|
||||
<unique-column name="class_id" />
|
||||
<unique-column name="object_identity_id" />
|
||||
<unique-column name="field_name" />
|
||||
<unique-column name="ace_order" />
|
||||
</unique>
|
||||
|
||||
<index>
|
||||
<index-column name="class_id" />
|
||||
<index-column name="object_identity_id" />
|
||||
<index-column name="security_identity_id" />
|
||||
</index>
|
||||
<index>
|
||||
<index-column name="class_id" />
|
||||
</index>
|
||||
<index>
|
||||
<index-column name="object_identity_id" />
|
||||
</index>
|
||||
<index>
|
||||
<index-column name="security_identity_id" />
|
||||
</index>
|
||||
|
||||
<foreign-key foreignTable="acl_classes" onDelete="CASCADE" onUpdate="CASCADE">
|
||||
<reference local="class_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="acl_object_identities" onDelete="CASCADE" onUpdate="CASCADE">
|
||||
<reference local="object_identity_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<foreign-key foreignTable="acl_security_identities" onDelete="CASCADE" onUpdate="CASCADE">
|
||||
<reference local="security_identity_id" foreign="id" />
|
||||
</foreign-key>
|
||||
</table>
|
||||
</database>
|
Loading…
Reference in a new issue