forked from KevinVdV/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DSpace#1265 from mwoodiupui/DS-3024
[DS-3024] "Administrator" and "Anonymous" groups can be renamed, which would cause them to no longer function in 6.x
- Loading branch information
Showing
19 changed files
with
860 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
.../src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V6.0_2016.01.03__DS-3024.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-- | ||
-- The contents of this file are subject to the license and copyright | ||
-- detailed in the LICENSE and NOTICE files at the root of the source | ||
-- tree and available online at | ||
-- | ||
-- http://www.dspace.org/license/ | ||
-- | ||
|
||
------------------------------------------------------ | ||
-- DS-3024 Invent "permanent" groups | ||
------------------------------------------------------ | ||
|
||
ALTER TABLE epersongroup | ||
ADD (permanent BOOLEAN DEFAULT false); | ||
UPDATE epersongroup SET permanent = true | ||
WHERE uuid IN ( | ||
SELECT dspace_object_id | ||
FROM metadataschemaregistry AS s | ||
JOIN metadatafieldregistry AS f | ||
ON (s.metadata_schema_id = f.metadata_schema_id) | ||
JOIN metadatavalue AS v | ||
ON (f.metadata_field_id = v.metadata_field_id) | ||
WHERE s.short_id = 'dc' | ||
AND f.element = 'title' | ||
AND f.qualifier IS NULL | ||
AND v.text_value IN ('Administrator', 'Anonymous') | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V6.0_2016.01.03__DS-3024.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- | ||
-- The contents of this file are subject to the license and copyright | ||
-- detailed in the LICENSE and NOTICE files at the root of the source | ||
-- tree and available online at | ||
-- | ||
-- http://www.dspace.org/license/ | ||
-- | ||
|
||
------------------------------------------------------ | ||
-- DS-3024 Invent "permanent" groups | ||
------------------------------------------------------ | ||
|
||
ALTER TABLE epersongroup | ||
ADD (permanent NUMBER(1) DEFAULT 0); | ||
UPDATE epersongroup SET permanent = 1 | ||
WHERE uuid IN ( | ||
SELECT dspace_object_id | ||
FROM metadataschemaregistry s | ||
JOIN metadatafieldregistry f USING (metadata_schema_id) | ||
JOIN metadatavalue v USING (metadata_field_id) | ||
WHERE s.short_id = 'dc' | ||
AND f.element = 'title' | ||
AND f.qualifier IS NULL | ||
AND v.text_value IN ('Administrator', 'Anonymous') | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...ain/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V6.0_2016.01.03__DS-3024.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- | ||
-- The contents of this file are subject to the license and copyright | ||
-- detailed in the LICENSE and NOTICE files at the root of the source | ||
-- tree and available online at | ||
-- | ||
-- http://www.dspace.org/license/ | ||
-- | ||
|
||
------------------------------------------------------ | ||
-- DS-3024 Invent "permanent" groups | ||
------------------------------------------------------ | ||
|
||
ALTER TABLE epersongroup | ||
ADD COLUMN permanent BOOLEAN DEFAULT false; | ||
UPDATE epersongroup SET permanent = true | ||
WHERE uuid IN ( | ||
SELECT dspace_object_id | ||
FROM metadataschemaregistry s | ||
JOIN metadatafieldregistry f USING (metadata_schema_id) | ||
JOIN metadatavalue v USING (metadata_field_id) | ||
WHERE s.short_id = 'dc' | ||
AND f.element = 'title' | ||
AND f.qualifier IS NULL | ||
AND v.text_value IN ('Administrator', 'Anonymous') | ||
); |
Oops, something went wrong.