<?xml version="1.0" encoding="iso-8859-1" ?>

<table>
  <base>CRM/ACL</base>
  <class>ACL</class>
  <name>civicrm_acl</name>
  <comment>Access Control List</comment>
  <add>1.6</add>
  <paths>
    <add>civicrm/acl/edit?reset=1&amp;action=add</add>
    <delete>civicrm/acl/delete?reset=1&amp;action=delete&amp;id=[id]</delete>
    <update>civicrm/acl/edit?reset=1&amp;action=edit&amp;id=[id]</update>
    <browse>civicrm/acl</browse>
  </paths>
  <field>
    <name>id</name>
    <title>ACL ID</title>
    <type>int unsigned</type>
    <required>true</required>
    <comment>Unique table ID</comment>
    <html>
      <type>Number</type>
    </html>
    <add>1.6</add>
  </field>
  <primaryKey>
    <name>id</name>
    <autoincrement>true</autoincrement>
  </primaryKey>
  <field>
    <name>name</name>
    <title>ACL Name</title>
    <type>varchar</type>
    <length>64</length>
    <comment>ACL Name.</comment>
    <html>
      <type>Text</type>
    </html>
    <add>1.6</add>
  </field>
  <field>
    <name>deny</name>
    <title>Deny ACL?</title>
    <type>boolean</type>
    <default>0</default>
    <required>true</required>
    <comment>Is this ACL entry Allow  (0) or Deny (1) ?</comment>
    <html>
      <type>Radio</type>
    </html>
    <add>1.6</add>
  </field>
  <field>
    <name>entity_table</name>
    <title>ACL Entity</title>
    <type>varchar</type>
    <length>64</length>
    <required>true</required>
    <comment>Table of the object possessing this ACL entry (Contact, Group, or ACL Group)</comment>
    <add>1.6</add>
  </field>
  <field>
    <name>entity_id</name>
    <type>int unsigned</type>
    <title>Entity ID</title>
    <comment>ID of the object possessing this ACL</comment>
    <pseudoconstant>
      <optionGroupName>acl_role</optionGroupName>
    </pseudoconstant>
    <add>1.6</add>
  </field>
  <dynamicForeignKey>
    <idColumn>entity_id</idColumn>
    <typeColumn>entity_table</typeColumn>
    <add>1.6</add>
  </dynamicForeignKey>
  <field>
    <name>operation</name>
    <type>varchar</type>
    <title>ACL Operation</title>
    <length>8</length>
    <required>true</required>
    <comment>What operation does this ACL entry control?</comment>
    <pseudoconstant>
      <callback>CRM_ACL_BAO_ACL::operation</callback>
    </pseudoconstant>
    <html>
      <type>Select</type>
    </html>
    <add>1.6</add>
  </field>
  <field>
    <name>object_table</name>
    <title>ACL Object</title>
    <type>varchar</type>
    <length>64</length>
    <comment>The table of the object controlled by this ACL entry</comment>
    <html>
      <label>Type of Data</label>
      <type>Select</type>
    </html>
    <pseudoconstant>
      <callback>CRM_ACL_BAO_ACL::getObjectTableOptions</callback>
    </pseudoconstant>
    <add>1.6</add>
  </field>
  <field>
    <name>object_id</name>
    <title>ACL Object ID</title>
    <type>int unsigned</type>
    <comment>The ID of the object controlled by this ACL entry</comment>
    <add>1.6</add>
    <html>
      <label>Which Data</label>
      <type>Select</type>
      <controlField>object_table</controlField>
    </html>
    <pseudoconstant>
      <callback>CRM_ACL_BAO_ACL::getObjectIdOptions</callback>
      <prefetch>disabled</prefetch>
    </pseudoconstant>
  </field>
  <field>
    <name>acl_table</name>
    <title>ACL Table</title>
    <type>varchar</type>
    <length>64</length>
    <comment>If this is a grant/revoke entry, what table are we granting?</comment>
    <add>1.6</add>
  </field>
  <field>
    <name>acl_id</name>
    <title>ACL Group ID</title>
    <type>int unsigned</type>
    <comment>ID of the ACL or ACL group being granted/revoked</comment>
    <add>1.6</add>
  </field>
  <index>
    <name>index_acl_id</name>
    <fieldName>acl_id</fieldName>
    <add>1.6</add>
  </index>
  <field>
    <name>is_active</name>
    <title>ACL Is Active?</title>
    <type>boolean</type>
    <required>true</required>
    <default>1</default>
    <comment>Is this property active?</comment>
    <add>1.6</add>
    <html>
      <type>CheckBox</type>
      <label>Enabled</label>
    </html>
  </field>
  <field>
    <name>priority</name>
    <type>int</type>
    <default>0</default>
    <required>true</required>
    <add>5.64</add>
    <html>
      <type>Number</type>
    </html>
  </field>
</table>
