Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DS-3097] Bitstreams of embargoed and/or withdrawn items can be acces…
…sed by anyone
- Loading branch information
1 parent
ad4d1a8
commit 98ae2bd
Showing
7 changed files
with
132 additions
and
13 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
24 changes: 24 additions & 0 deletions
24
.../src/main/resources/org/dspace/storage/rdbms/sqlmigration/h2/V6.0_2016.08.23__DS-3097.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,24 @@ | ||
-- | ||
-- 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-3097 introduced new action id for WITHDRAWN_READ | ||
------------------------------------------------------ | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT bundle2bitstream.bitstream_id FROM bundle2bitstream | ||
LEFT JOIN item2bundle ON bundle2bitstream.bundle_id = item2bundle.bundle_id | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = 1 | ||
); | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT item2bundle.bundle_id FROM item2bundle | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = 1 | ||
); |
24 changes: 24 additions & 0 deletions
24
.../main/resources/org/dspace/storage/rdbms/sqlmigration/oracle/V6.0_2016.08.23__DS-3097.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,24 @@ | ||
-- | ||
-- 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-3097 introduced new action id for WITHDRAWN_READ | ||
------------------------------------------------------ | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT bundle2bitstream.bitstream_id FROM bundle2bitstream | ||
LEFT JOIN item2bundle ON bundle2bitstream.bundle_id = item2bundle.bundle_id | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = 1 | ||
); | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT item2bundle.bundle_id FROM item2bundle | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = 1 | ||
); |
24 changes: 24 additions & 0 deletions
24
...ain/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V6.0_2016.08.23__DS-3097.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,24 @@ | ||
-- | ||
-- 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-3097 introduced new action id for WITHDRAWN_READ | ||
------------------------------------------------------ | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT bundle2bitstream.bitstream_id FROM bundle2bitstream | ||
LEFT JOIN item2bundle ON bundle2bitstream.bundle_id = item2bundle.bundle_id | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = true | ||
); | ||
|
||
UPDATE resourcepolicy SET action_id = 12 where action_id = 0 and dspace_object in ( | ||
SELECT item2bundle.bundle_id FROM item2bundle | ||
LEFT JOIN item ON item2bundle.item_id = item.uuid | ||
WHERE item.withdrawn = true | ||
); |