Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
da173ac0
Commit
da173ac0
authored
Mar 03, 2021
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_mysql_innodb, erp5_core: Use security uid column by default.
parent
5ad2ec85
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
136 additions
and
34 deletions
+136
-34
product/ERP5/bootstrap/erp5_core/PathTemplateItem/portal_categories/local_role_group/agent.xml
...TemplateItem/portal_categories/local_role_group/agent.xml
+79
-0
product/ERP5/bootstrap/erp5_core/bt/template_path_list
product/ERP5/bootstrap/erp5_core/bt/template_path_list
+1
-0
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_list.sql
...ortal_catalog/erp5_mysql_innodb/z_catalog_object_list.sql
+2
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_list.xml
...ortal_catalog/erp5_mysql_innodb/z_catalog_object_list.xml
+8
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_roles_and_users_list.sql
...alog/erp5_mysql_innodb/z_catalog_roles_and_users_list.sql
+3
-3
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_roles_and_users_list.xml
...alog/erp5_mysql_innodb/z_catalog_roles_and_users_list.xml
+7
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog.sql
...tem/portal_catalog/erp5_mysql_innodb/z_create_catalog.sql
+2
-0
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog.xml
...tem/portal_catalog/erp5_mysql_innodb/z_create_catalog.xml
+8
-6
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_roles_and_users.sql
...al_catalog/erp5_mysql_innodb/z_create_roles_and_users.sql
+3
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_roles_and_users.xml
...al_catalog/erp5_mysql_innodb/z_create_roles_and_users.xml
+8
-6
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_security.sql
...em/portal_catalog/erp5_mysql_innodb/z_search_security.sql
+1
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_security.xml
...em/portal_catalog/erp5_mysql_innodb/z_search_security.xml
+10
-6
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogSecurityUidColumnTemplateItem/security_uid_column_list.xml
...ecurityUidColumnTemplateItem/security_uid_column_list.xml
+3
-0
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_security_uid_column_list
...nodb_catalog/bt/template_catalog_security_uid_column_list
+1
-0
No files found.
product/ERP5/bootstrap/erp5_core/PathTemplateItem/portal_categories/local_role_group/agent.xml
0 → 100644
View file @
da173ac0
<?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>
product/ERP5/bootstrap/erp5_core/bt/template_path_list
View file @
da173ac0
...
...
@@ -22,6 +22,7 @@ portal_categories/constraint_type/post_upgrade
portal_categories/constraint_type/pre_upgrade
portal_categories/constraint_type/upgrader
portal_categories/elementary_type/**
portal_categories/local_role_group/agent
portal_contribution_registry/default_predicate
portal_domains/base_day_domain
portal_domains/base_month_domain
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_list.sql
View file @
da173ac0
REPLACE
INTO
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`
,
`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`
,
...
...
@@ -10,6 +10,7 @@ VALUES
(
<
dtml
-
sqlvar
expr
=
"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
=
"(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''"
type
=
"string"
optional
>
,
<
dtml
-
sqlvar
expr
=
"getPath[loop_item]"
type
=
"string"
>
,
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_list.xml
View file @
da173ac0
...
...
@@ -8,14 +8,13 @@
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\n
security_uid\n
agent_security_uid\n
getOwnerInfo\n
getViewPermissionOwner\n
getPath\n
...
...
@@ -54,11 +53,15 @@ getModificationDate</string> </value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_roles_and_users_list.sql
View file @
da173ac0
<
dtml
-
let
row_list
=
"[]"
>
<
dtml
-
in
prefix
=
"loop"
expr
=
"_.range(_.len(optimised_roles_and_users))"
>
<
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
-
if
expr
=
"row_list"
>
INSERT
INTO
roles_and_users
(
uid
,
allowedRolesAndUsers
)
roles_and_users
(
uid
,
local_roles_group_id
,
allowedRolesAndUsers
)
VALUES
<
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
-
in
>
</
dtml
-
if
>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_roles_and_users_list.xml
View file @
da173ac0
...
...
@@ -8,9 +8,7 @@
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
...
...
@@ -22,11 +20,15 @@
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog.sql
View file @
da173ac0
...
...
@@ -5,6 +5,7 @@
CREATE
TABLE
`catalog`
(
`uid`
BIGINT
UNSIGNED
NOT
NULL
,
`security_uid`
INT
UNSIGNED
,
`agent_security_uid`
INT
UNSIGNED
,
`owner`
varbinary
(
255
)
NOT
NULL
default
''
,
`viewable_owner`
varbinary
(
255
)
NOT
NULL
default
''
,
`path`
varchar
(
255
)
NOT
NULL
default
''
,
...
...
@@ -39,6 +40,7 @@ CREATE TABLE `catalog` (
`indexation_timestamp`
TIMESTAMP
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`uid`
),
KEY
`security_uid`
(
`security_uid`
),
KEY
`agent_security_uid`
(
`agent_security_uid`
),
KEY
`owner`
(
`owner`
),
KEY
`viewable_owner`
(
`viewable_owner`
),
KEY
`Parent`
(
`parent_uid`
),
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog.xml
View file @
da173ac0
...
...
@@ -14,9 +14,7 @@
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
...
...
@@ -28,11 +26,15 @@
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
...
...
@@ -62,7 +64,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
z_create_catalog
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_roles_and_users.sql
View file @
da173ac0
CREATE
TABLE
roles_and_users
(
uid
INT
UNSIGNED
,
local_roles_group_id
VARCHAR
(
255
)
default
''
,
allowedRolesAndUsers
VARCHAR
(
255
),
KEY
`uid`
(
`uid`
),
KEY
`allowedRolesAndUsers`
(
`allowedRolesAndUsers`
)
KEY
`allowedRolesAndUsers`
(
`allowedRolesAndUsers`
),
KEY
`local_roles_group_id`
(
`local_roles_group_id`
)
)
ENGINE
=
InnoDB
;
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_roles_and_users.xml
View file @
da173ac0
...
...
@@ -14,9 +14,7 @@
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
...
...
@@ -28,11 +26,15 @@
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
...
...
@@ -62,7 +64,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
z_create_roles_and_users
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_security.sql
View file @
da173ac0
SELECT
DISTINCT
uid
DISTINCT
uid
,
local_roles_group_id
FROM
roles_and_users
WHERE
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_security.xml
View file @
da173ac0
...
...
@@ -8,9 +8,7 @@
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
...
...
@@ -22,15 +20,21 @@
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<string></string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogSecurityUidColumnTemplateItem/security_uid_column_list.xml
0 → 100644
View file @
da173ac0
<key_list>
<key>
agent | agent_security_uid
</key>
</key_list>
\ No newline at end of file
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_security_uid_column_list
0 → 100644
View file @
da173ac0
agent | agent_security_uid
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment