Commit da173ac0 authored by Yusei Tahara's avatar Yusei Tahara

erp5_mysql_innodb, erp5_core: Use security uid column by default.

parent 5ad2ec85
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>agent</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -22,6 +22,7 @@ portal_categories/constraint_type/post_upgrade ...@@ -22,6 +22,7 @@ portal_categories/constraint_type/post_upgrade
portal_categories/constraint_type/pre_upgrade portal_categories/constraint_type/pre_upgrade
portal_categories/constraint_type/upgrader portal_categories/constraint_type/upgrader
portal_categories/elementary_type/** portal_categories/elementary_type/**
portal_categories/local_role_group/agent
portal_contribution_registry/default_predicate portal_contribution_registry/default_predicate
portal_domains/base_day_domain portal_domains/base_day_domain
portal_domains/base_month_domain portal_domains/base_month_domain
......
REPLACE INTO REPLACE INTO
catalog catalog
(`uid`, `security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`, (`uid`, `security_uid`, `agent_security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`,
`portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`, `portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`,
`causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`, `grouping_date`, `causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`, `grouping_date`,
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `creation_date`, `source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `creation_date`,
...@@ -10,6 +10,7 @@ VALUES ...@@ -10,6 +10,7 @@ VALUES
( (
<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-sqlvar expr="uid[loop_item]" type="int">,
<dtml-sqlvar expr="security_uid[loop_item]" type="int">, <dtml-sqlvar expr="security_uid[loop_item]" type="int">,
<dtml-sqlvar expr="agent_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">, <dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">,
<dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>, <dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>,
<dtml-sqlvar expr="getPath[loop_item]" type="string">, <dtml-sqlvar expr="getPath[loop_item]" type="string">,
......
...@@ -8,14 +8,13 @@ ...@@ -8,14 +8,13 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>allow_simple_one_argument_traversal</string> </key> <key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <value> <int>0</int> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string>uid\n <value> <string>uid\n
security_uid\n security_uid\n
agent_security_uid\n
getOwnerInfo\n getOwnerInfo\n
getViewPermissionOwner\n getViewPermissionOwner\n
getPath\n getPath\n
...@@ -54,11 +53,15 @@ getModificationDate</string> </value> ...@@ -54,11 +53,15 @@ getModificationDate</string> </value>
</item> </item>
<item> <item>
<key> <string>class_file_</string> </key> <key> <string>class_file_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>class_name_</string> </key> <key> <string>class_name_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_hook</string> </key> <key> <string>connection_hook</string> </key>
......
<dtml-let row_list="[]"> <dtml-let row_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(optimised_roles_and_users))"> <dtml-in prefix="loop" expr="_.range(_.len(optimised_roles_and_users))">
<dtml-in prefix="role" expr="optimised_roles_and_users[loop_item]"> <dtml-in prefix="role" expr="optimised_roles_and_users[loop_item]">
<dtml-call expr="row_list.append([role_item[0], role_item[2]])"> <dtml-call expr="row_list.append([role_item[0], role_item[1], role_item[2]])">
</dtml-in> </dtml-in>
</dtml-in> </dtml-in>
<dtml-if expr="row_list"> <dtml-if expr="row_list">
INSERT INTO INSERT INTO
roles_and_users(uid, allowedRolesAndUsers) roles_and_users(uid, local_roles_group_id, allowedRolesAndUsers)
VALUES VALUES
<dtml-in prefix="row" expr="row_list"> <dtml-in prefix="row" expr="row_list">
(<dtml-sqlvar expr="row_item[0]" type="string">, <dtml-sqlvar expr="row_item[1]" type="string">) (<dtml-sqlvar expr="row_item[0]" type="string">, <dtml-sqlvar expr="row_item[1]" type="string">, <dtml-sqlvar expr="row_item[2]" type="string">)
<dtml-if sequence-end><dtml-else>,</dtml-if> <dtml-if sequence-end><dtml-else>,</dtml-if>
</dtml-in> </dtml-in>
</dtml-if> </dtml-if>
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>allow_simple_one_argument_traversal</string> </key> <key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <value> <int>0</int> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
...@@ -22,11 +20,15 @@ ...@@ -22,11 +20,15 @@
</item> </item>
<item> <item>
<key> <string>class_file_</string> </key> <key> <string>class_file_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>class_name_</string> </key> <key> <string>class_name_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_hook</string> </key> <key> <string>connection_hook</string> </key>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
CREATE TABLE `catalog` ( CREATE TABLE `catalog` (
`uid` BIGINT UNSIGNED NOT NULL, `uid` BIGINT UNSIGNED NOT NULL,
`security_uid` INT UNSIGNED, `security_uid` INT UNSIGNED,
`agent_security_uid` INT UNSIGNED,
`owner` varbinary(255) NOT NULL default '', `owner` varbinary(255) NOT NULL default '',
`viewable_owner` varbinary(255) NOT NULL default '', `viewable_owner` varbinary(255) NOT NULL default '',
`path` varchar(255) NOT NULL default '', `path` varchar(255) NOT NULL default '',
...@@ -39,6 +40,7 @@ CREATE TABLE `catalog` ( ...@@ -39,6 +40,7 @@ CREATE TABLE `catalog` (
`indexation_timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `indexation_timestamp` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uid`), PRIMARY KEY (`uid`),
KEY `security_uid` (`security_uid`), KEY `security_uid` (`security_uid`),
KEY `agent_security_uid` (`agent_security_uid`),
KEY `owner` (`owner`), KEY `owner` (`owner`),
KEY `viewable_owner` (`viewable_owner`), KEY `viewable_owner` (`viewable_owner`),
KEY `Parent` (`parent_uid`), KEY `Parent` (`parent_uid`),
......
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
</item> </item>
<item> <item>
<key> <string>allow_simple_one_argument_traversal</string> </key> <key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <value> <int>0</int> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
...@@ -28,11 +26,15 @@ ...@@ -28,11 +26,15 @@
</item> </item>
<item> <item>
<key> <string>class_file_</string> </key> <key> <string>class_file_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>class_name_</string> </key> <key> <string>class_name_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_hook</string> </key> <key> <string>connection_hook</string> </key>
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>z_create_catalog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
CREATE TABLE roles_and_users ( CREATE TABLE roles_and_users (
uid INT UNSIGNED, uid INT UNSIGNED,
local_roles_group_id VARCHAR(255) default '',
allowedRolesAndUsers VARCHAR(255), allowedRolesAndUsers VARCHAR(255),
KEY `uid` (`uid`), KEY `uid` (`uid`),
KEY `allowedRolesAndUsers` (`allowedRolesAndUsers`) KEY `allowedRolesAndUsers` (`allowedRolesAndUsers`),
KEY `local_roles_group_id` (`local_roles_group_id`)
) ENGINE=InnoDB; ) ENGINE=InnoDB;
...@@ -14,9 +14,7 @@ ...@@ -14,9 +14,7 @@
</item> </item>
<item> <item>
<key> <string>allow_simple_one_argument_traversal</string> </key> <key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <value> <int>0</int> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
...@@ -28,11 +26,15 @@ ...@@ -28,11 +26,15 @@
</item> </item>
<item> <item>
<key> <string>class_file_</string> </key> <key> <string>class_file_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>class_name_</string> </key> <key> <string>class_name_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_hook</string> </key> <key> <string>connection_hook</string> </key>
...@@ -62,7 +64,7 @@ ...@@ -62,7 +64,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>z_create_roles_and_users</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
SELECT SELECT
DISTINCT uid DISTINCT uid, local_roles_group_id
FROM FROM
roles_and_users roles_and_users
WHERE WHERE
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>allow_simple_one_argument_traversal</string> </key> <key> <string>allow_simple_one_argument_traversal</string> </key>
<value> <value> <int>0</int> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
...@@ -22,15 +20,21 @@ ...@@ -22,15 +20,21 @@
</item> </item>
<item> <item>
<key> <string>class_file_</string> </key> <key> <string>class_file_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>class_name_</string> </key> <key> <string>class_name_</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_hook</string> </key> <key> <string>connection_hook</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>connection_id</string> </key> <key> <string>connection_id</string> </key>
......
<key_list>
<key>agent | agent_security_uid</key>
</key_list>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment