Merged V2.9 to HEAD

10586: Merged V2.2 to V2.9
      9883: Fix for https://issues.alfresco.com/jira/browse/ETWOTWO-561
      9893: Gave some more time to wait for the threads to finish (QNameDAOTest)
      9955: Added trace logging of calls that possibly cause failures during session flushing
      9956: Part fix ETWOTWO570: RetryingTransactionAdvice needs to use RetryingTransactionHelper
      9958: Fixed ETWOTWO-570: AVM transaction interceptors fail if methods are incorrectly declared
      9973: More missing transaction declarations for AttributeService
      9977: Fixed unit test to rollback properly after expected txn failure
      9978: Fix for ETWOTWO-440: Error : 500: Failed to execute method NodeInfoBean.sendNodeInfo
      9986: LinkValidationService missing txn declaration for onBootstrap
   10588: Merged V2.2 to V2.9
      9898: Fixed handling of cm:name on root nodes
      9900: Empty property sets are allowed
   10589: Merged V2.2 to V2.9
      9965: Fixed unit test to inject 'nodeService' and not 'NodeService'.
      10311: getWebProjectUserRole - change log level from info to debug
      10329: Fix missing and mis-spelt transaction declarations
      10343: Fix for ETWOTWO-32
      10346: Build Fix
      10358: Fix for ETWOTWO-621
      10362: Fix for ETWOTWO-518
      10371: QNameDAO cache doesn't blow up if cache entry is invalid
      10538: Fix for minor XSS issue identified in ETWOTWO-657 item 3
   10678: Merged V2.2 to V2.9
      10205: Fix for ETWOTWO-48: Cancelled import of war into a Web project and Web Project became unusable
      10206: Fix for ETWOTWO-181: Deletion of checked out document


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10710 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-09-04 01:19:51 +00:00
parent 3227355279
commit 76abcf04d9
23 changed files with 592 additions and 239 deletions

View File

@@ -82,7 +82,7 @@ UPDATE alf_access_control_entry ace
-- migrate data - build equivalent ACL entries
INSERT INTO alf_acl_member (version, acl_id, ace_id, pos)
select 1, acl_id, id, 0 from alf_access_control_entry;
select 1, ace.acl_id, ace.id, 0 from alf_access_control_entry ace join alf_access_control_list acl on acl.id = ace.acl_id;
-- Create ACE context
CREATE TABLE alf_ace_context (
@@ -125,16 +125,30 @@ CREATE INDEX fk_alf_ace_ctx ON alf_access_control_entry (context_id);
ALTER TABLE alf_access_control_entry ADD CONSTRAINT fk_alf_ace_ctx FOREIGN KEY (context_id) REFERENCES alf_ace_context (id);
CREATE TABLE alf_tmp_min_ace (
min BIGINT NOT NULL,
permission_id BIGINT NOT NULL,
authority_id BIGINT NOT NULL,
allowed BIT(1) NOT NULL,
applies INT NOT NULL,
UNIQUE (permission_id, authority_id, allowed, applies)
) ENGINE=InnoDB;
INSERT INTO alf_tmp_min_ace (min, permission_id, authority_id, allowed, applies)
SELECT min(ace1.id), ace1.permission_id, ace1.authority_id, ace1.allowed, ace1.applies FROM alf_access_control_entry ace1 group by ace1.permission_id, ace1.authority_id, ace1.allowed, ace1.applies;
-- Update members to point to the first use of an access control entry
UPDATE alf_acl_member mem
SET ace_id = (SELECT min(ace2.id) FROM alf_access_control_entry ace1
JOIN alf_access_control_entry ace2
ON ace1.permission_id = ace2.permission_id AND
ace1.authority_id = ace2.authority_id AND
ace1.allowed = ace2.allowed AND
ace1.applies = ace2.applies
WHERE ace1.id = mem.ace_id );
SET ace_id = (SELECT help.min FROM alf_access_control_entry ace
JOIN alf_tmp_min_ace help
ON help.permission_id = ace.permission_id AND
help.authority_id = ace.authority_id AND
help.allowed = ace.allowed AND
help.applies = ace.applies
WHERE ace.id = mem.ace_id );
DROP TABLE alf_tmp_min_ace;
-- Remove duplicate aces the mysql way (as you can not use the deleted table in the where clause ...)