Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release merge - 2025/Mar/07 #889

Merged
merged 56 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5e1c099
UFAL/Removed duplicities of the bitstreams in the cmdi (#766)
milanmajchrak Sep 20, 2024
1e2b8ef
Ufal/Preview issues (#764)
milanmajchrak Sep 20, 2024
4f579e1
UFAL/Encoded the UTF-8 characters from the redirect URL to UTF (#758)
milanmajchrak Sep 20, 2024
140f0b7
Merge pull request #9790 from DSpace/backport-9775-to-dspace-7_x (#769)
milanmajchrak Sep 24, 2024
dd24d2b
test for bitstream with null value of sizebytes
Paurikova2 Oct 10, 2024
9386c0e
Update README.md
vidiecan Oct 15, 2024
0659305
UFAL/Shibboleth - load more net-id headers e.g. persistent-id (#772)
milanmajchrak Oct 16, 2024
999164c
Propagate the verification token to the DB after the email is success…
milanmajchrak Oct 16, 2024
6c6de87
UFAL/Enhanced type-bind feature (#762)
milanmajchrak Oct 17, 2024
8d115da
create preview content for tar files (#759)
Paurikova2 Oct 17, 2024
659d14e
Internal/fix failing Clarin integration test (#796)
milanmajchrak Oct 31, 2024
68fb203
Rest api for handle resolution with metadata
Paurikova2 Nov 4, 2024
8aed694
Add default licenses - from ZCU update (#801)
milanmajchrak Nov 12, 2024
a9078bb
UFAL/share submission by email (#780)
milanmajchrak Nov 12, 2024
2ff2286
Import default licenses only if the license tables are empty. (#808)
milanmajchrak Nov 12, 2024
bc75418
Oai elg crosswalk (#798)
Paurikova2 Nov 15, 2024
dad2ea2
removed handle from item submission (#812)
Paurikova2 Nov 15, 2024
32f61b3
UFAL/Shibboleth - netid-header should use getArrayProperty everywhere…
milanmajchrak Nov 19, 2024
582906c
UFAL/Autocomplete enhancement (#768)
milanmajchrak Nov 19, 2024
c25374e
UFAL/Changed position of rows in submission-forms.xml following v5 (#…
jr-rk Nov 19, 2024
37cf904
Show db connection statistics in the log file or the `dbstatistics` e…
milanmajchrak Nov 21, 2024
e29101b
Translation of submission-forms to _cs (#816)
jr-rk Nov 26, 2024
dadd1fc
Updated cfg to pretify the author suggestions (#819)
milanmajchrak Nov 27, 2024
0a0466e
crosswalk-embargo (#821)
Paurikova2 Nov 27, 2024
9911fcc
For now the complex input field is without autocomplete for the size …
milanmajchrak Nov 28, 2024
da05904
Send the custom type bind `field` to the FE configuration (#822)
milanmajchrak Nov 28, 2024
3aec368
fix date converting to string (#825)
Paurikova2 Nov 28, 2024
005c939
cherry-pick clarin v7 into dtq dev (#820)
kosarko Nov 29, 2024
9758648
Test release without db logs (#827)
milanmajchrak Nov 29, 2024
3486d2d
UFAL/Matomo statistics with dimension (#813)
jr-rk Nov 29, 2024
3ec13b2
The `dspace.name.short` is not working properly in the email, use `ds…
milanmajchrak Dec 5, 2024
56b4862
Assinging to JAVA_OPTS_HANDLE must be without $
milanmajchrak Dec 6, 2024
dc57ffd
Transaction bug - close context in finally block (#845) (#852)
milanmajchrak Jan 16, 2025
0b20909
metadata-added-provenance (#730)
Paurikova2 Jan 23, 2025
ca40fa9
Facet result for suggestion (#854)
milanmajchrak Jan 24, 2025
b260927
Healthcheck process (#853)
milanmajchrak Jan 24, 2025
018af11
Changed matomo url to some valid URL (#856)
milanmajchrak Jan 24, 2025
eacd6d3
Oai indexing after res policy change (#855)
milanmajchrak Jan 24, 2025
4e83fdd
Run build action every 4 hours to be sure tests are still passing.
milanmajchrak Jan 24, 2025
7670b7b
The dc.type should not be repeatable (#861)
milanmajchrak Jan 30, 2025
aca89cd
UFAL/Health report send to more email adresses
Kasinhou Feb 3, 2025
9b012dd
UFAL/Fixed missing `*` character in the required input field
milanmajchrak Feb 3, 2025
97fa905
Res policy for submitter (#862)
Paurikova2 Feb 4, 2025
b53670b
Update tag-release.yml - generate release image also for psql, solr a…
milanmajchrak Feb 5, 2025
cb16285
Update tag-release.yml - added workflow_dispatch
milanmajchrak Feb 5, 2025
9fbe428
Update tag-release.yml - hardcoded lindat release retag
milanmajchrak Feb 5, 2025
80c7cfc
Update tag-release.yml - revert hardcoded lindat retag
milanmajchrak Feb 5, 2025
acd882a
check submit group for submitter not for current user
Paurikova2 Feb 7, 2025
534c03b
changed hasMetadata to hasCMDI in submission form
Paurikova2 Feb 14, 2025
3a48e00
cz-submission-form-no-repeatable-type
Paurikova2 Feb 14, 2025
2e30187
ZCU/Fix sword auth issues (#871) (#876)
milanmajchrak Feb 14, 2025
ca97e0e
Run build action every 4h for every customer/ branch
milanmajchrak Feb 18, 2025
8100cb5
import/comment-license-script (#882)
Paurikova2 Feb 20, 2025
7d01ef5
UFAL/Do not use not-existing metadatafield `hasMetadata` in the submi…
milanmajchrak Mar 6, 2025
f7d623e
UFAL/Created job to generate preview for every item or for a specific…
milanmajchrak Mar 7, 2025
a4130ca
Merge branch 'dtq-dev' into lindat-merge-dtq-dev-2025-03-07
milanmajchrak Mar 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v3
uses: actions/checkout@v4

# https://github.com/actions/setup-java
- name: Install JDK ${{ matrix.java }}
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- '**'
workflow_dispatch:


env:
IMAGE_BASE_NAME: dataquest/dspace
Expand All @@ -26,8 +28,19 @@ jobs:
docker pull ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.ref_name }}

docker pull ${{ env.IMAGE_BASE_NAME }}-solr:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}-solr:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}-solr:${{ github.ref_name }}

docker pull ${{ env.IMAGE_BASE_NAME }}-postgres-pgcrypto:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}-postgres-pgcrypto:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}-postgres-pgcrypto:${{ github.ref_name }}

docker pull ${{ env.IMAGE_BASE_NAME }}-dependencies:${{ github.sha }}
docker tag ${{ env.IMAGE_BASE_NAME }}-dependencies:${{ github.sha }} ${{ env.IMAGE_BASE_NAME }}-dependencies:${{ github.ref_name }}

- name: push image
run: |
docker push ${{ env.IMAGE_BASE_NAME }}:${{ github.ref_name }}
docker push ${{ env.IMAGE_BASE_NAME }}-cli:${{ github.ref_name }}

docker push ${{ env.IMAGE_BASE_NAME }}-solr:${{ github.ref_name }}
docker push ${{ env.IMAGE_BASE_NAME }}-postgres-pgcrypto:${{ github.ref_name }}
docker push ${{ env.IMAGE_BASE_NAME }}-dependencies:${{ github.ref_name }}
29 changes: 29 additions & 0 deletions .github/workflows/trigger-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Trigger Build for All Customer Branches

on:
schedule:
- cron: "0 */4 * * *" # Runs every 4 hours
workflow_dispatch: # Allows manual triggering

permissions:
actions: write # Grants permission to trigger workflows
contents: read # Access to repository contents

jobs:
trigger-builds:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4 # Ensures the repository is available

- name: Get and Trigger Customer Branch Builds
run: |
# Authenticate with GitHub CLI using the token
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token

git fetch --prune origin # Ensure remote refs are fetched
BRANCHES=$(git ls-remote --heads origin | awk -F'/' '{print $3"/"$4}' | grep '^customer/')
for branch in $(echo "$BRANCHES" | sed -e 's/[\[\]"]//g' -e 's/,/\n/g'); do
echo "Triggering build for branch: $branch"
gh workflow run build.yml --ref $branch
done
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
* @author Milan Majchrak (dspace at dataquest.sk)
*/
public class HealthReport extends DSpaceRunnable<HealthReportScriptConfiguration> {
ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
private static final Logger log = LogManager.getLogger(HealthReport.class);

private ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
private EPersonService ePersonService;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1789,7 +1789,8 @@ protected void processOptions(Context c, Item myItem, List<String> options)
} else {
logInfo("\tSetting special permissions for "
+ bitstreamName);
setPermission(c, myGroup, actionID, bs);
String rpType = useWorkflow ? ResourcePolicy.TYPE_SUBMISSION : ResourcePolicy.TYPE_INHERITED;
setPermission(c, myGroup, rpType, actionID, bs);
}
}

Expand Down Expand Up @@ -1847,24 +1848,25 @@ protected void processOptions(Context c, Item myItem, List<String> options)
*
* @param c DSpace Context
* @param g Dspace Group
* @param rpType resource policy type string
* @param actionID action identifier
* @param bs Bitstream
* @throws SQLException if database error
* @throws AuthorizeException if authorization error
* @see org.dspace.core.Constants
*/
protected void setPermission(Context c, Group g, int actionID, Bitstream bs)
protected void setPermission(Context c, Group g, String rpType, int actionID, Bitstream bs)
throws SQLException, AuthorizeException {
if (!isTest) {
// remove the default policy
authorizeService.removeAllPolicies(c, bs);

// add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, g);

rp.setdSpaceObject(bs);
rp.setAction(actionID);
rp.setGroup(g);
rp.setRpType(rpType);

resourcePolicyService.update(c, rp);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,11 @@ public void addPolicies(Context c, List<ResourcePolicy> policies, DSpaceObject d
List<ResourcePolicy> newPolicies = new ArrayList<>(policies.size());

for (ResourcePolicy srp : policies) {
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, srp.getEPerson(), srp.getGroup());

// copy over values
rp.setdSpaceObject(dest);
rp.setAction(srp.getAction());
rp.setEPerson(srp.getEPerson());
rp.setGroup(srp.getGroup());
rp.setStartDate(srp.getStartDate());
rp.setEndDate(srp.getEndDate());
rp.setRpName(srp.getRpName());
Expand Down Expand Up @@ -679,11 +677,9 @@ public ResourcePolicy createResourcePolicy(Context context, DSpaceObject dso, Gr
"We need at least an eperson or a group in order to create a resource policy.");
}

ResourcePolicy myPolicy = resourcePolicyService.create(context);
ResourcePolicy myPolicy = resourcePolicyService.create(context, eperson, group);
myPolicy.setdSpaceObject(dso);
myPolicy.setAction(type);
myPolicy.setGroup(group);
myPolicy.setEPerson(eperson);
myPolicy.setRpType(rpType);
myPolicy.setRpName(rpName);
myPolicy.setRpDescription(rpDescription);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ private static void addAnonymousPolicy(Context c, DSpaceObject t,

// now create the default policies for submitted items
ResourcePolicyService resourcePolicyService = AuthorizeServiceFactory.getInstance().getResourcePolicyService();
ResourcePolicy myPolicy = resourcePolicyService.create(c);
ResourcePolicy myPolicy = resourcePolicyService.create(c, null, anonymousGroup);
myPolicy.setdSpaceObject(t);
myPolicy.setAction(myaction);
myPolicy.setGroup(anonymousGroup);
resourcePolicyService.update(c, myPolicy);
}
}
9 changes: 3 additions & 6 deletions dspace-api/src/main/java/org/dspace/authorize/PolicySet.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,10 @@ public static void setPoliciesFilter(Context c, int containerType,
// before create a new policy check if an identical policy is already in place
if (!authorizeService.isAnIdenticalPolicyAlreadyInPlace(c, myitem, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);

rp.setdSpaceObject(myitem);
rp.setAction(actionID);
rp.setGroup(group);

rp.setRpName(name);
rp.setRpDescription(description);
Expand Down Expand Up @@ -262,11 +261,10 @@ public static void setPoliciesFilter(Context c, int containerType,
// before create a new policy check if an identical policy is already in place
if (!authorizeService.isAnIdenticalPolicyAlreadyInPlace(c, bundle, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);

rp.setdSpaceObject(bundle);
rp.setAction(actionID);
rp.setGroup(group);

rp.setRpName(name);
rp.setRpDescription(description);
Expand Down Expand Up @@ -305,11 +303,10 @@ public static void setPoliciesFilter(Context c, int containerType,
if (!authorizeService
.isAnIdenticalPolicyAlreadyInPlace(c, bitstream, group, actionID, -1)) {
// now add the policy
ResourcePolicy rp = resourcePolicyService.create(c);
ResourcePolicy rp = resourcePolicyService.create(c, null, group);

rp.setdSpaceObject(bitstream);
rp.setAction(actionID);
rp.setGroup(group);

rp.setRpName(name);
rp.setRpDescription(description);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,22 @@ public ResourcePolicy find(Context context, int id) throws SQLException {
* Create a new ResourcePolicy
*
* @param context DSpace context object
* @param ePerson
* @param group
* @return ResourcePolicy
* @throws SQLException if database error
*/
@Override
public ResourcePolicy create(Context context) throws SQLException {
public ResourcePolicy create(Context context, EPerson ePerson, Group group) throws SQLException {
// FIXME: Check authorisation
// Create a table row
ResourcePolicy resourcePolicy = resourcePolicyDAO.create(context, new ResourcePolicy());
ResourcePolicy policyToBeCreated = new ResourcePolicy();
if (ePerson == null && group == null) {
throw new IllegalArgumentException("A resource policy must contain a valid eperson or group");
}
policyToBeCreated.setEPerson(ePerson);
policyToBeCreated.setGroup(group);
ResourcePolicy resourcePolicy = resourcePolicyDAO.create(context, policyToBeCreated);
return resourcePolicy;
}

Expand Down Expand Up @@ -212,9 +220,7 @@ public boolean isDateValid(ResourcePolicy resourcePolicy) {
@Override
public ResourcePolicy clone(Context context, ResourcePolicy resourcePolicy)
throws SQLException, AuthorizeException {
ResourcePolicy clone = create(context);
clone.setGroup(resourcePolicy.getGroup());
clone.setEPerson(resourcePolicy.getEPerson());
ResourcePolicy clone = create(context, resourcePolicy.getEPerson(), resourcePolicy.getGroup());
clone.setStartDate((Date) ObjectUtils.clone(resourcePolicy.getStartDate()));
clone.setEndDate((Date) ObjectUtils.clone(resourcePolicy.getEndDate()));
clone.setRpType((String) ObjectUtils.clone(resourcePolicy.getRpType()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.dspace.eperson.Group;
import org.dspace.service.DSpaceCRUDService;

/**
* Service interface class for the ResourcePolicy object.
Expand All @@ -26,7 +25,34 @@
*
* @author kevinvandevelde at atmire.com
*/
public interface ResourcePolicyService extends DSpaceCRUDService<ResourcePolicy> {
public interface ResourcePolicyService {

public ResourcePolicy create(Context context, EPerson eperson, Group group) throws SQLException, AuthorizeException;

public ResourcePolicy find(Context context, int id) throws SQLException;

/**
* Persist a model object.
*
* @param context
* @param resourcePolicy object to be persisted.
* @throws SQLException passed through.
* @throws AuthorizeException passed through.
*/
public void update(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException;


/**
* Persist a collection of model objects.
*
* @param context
* @param resourcePolicies object to be persisted.
* @throws SQLException passed through.
* @throws AuthorizeException passed through.
*/
public void update(Context context, List<ResourcePolicy> resourcePolicies) throws SQLException, AuthorizeException;

public void delete(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException;


public List<ResourcePolicy> find(Context c, DSpaceObject o) throws SQLException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public Item installItem(Context c, InProgressSubmission is,

//Allow submitter to edit item
if (isCollectionAllowedForSubmitterEditing(item.getOwningCollection()) &&
isInSubmitGroup(c.getCurrentUser(), item.getOwningCollection().getID())) {
isInSubmitGroup(item.getSubmitter(), item.getOwningCollection().getID())) {
createResourcePolicy(c, item, Constants.WRITE);
}

Expand Down Expand Up @@ -410,10 +410,9 @@ private boolean isInSubmitGroup(EPerson eperson, UUID collectionUUID) {
*/
private void createResourcePolicy(Context context, Item item, int action) throws SQLException, AuthorizeException {
context.turnOffAuthorisationSystem();
ResourcePolicy resPol = resourcePolicyService.create(context);
ResourcePolicy resPol = resourcePolicyService.create(context, item.getSubmitter(), null);
resPol.setAction(action);
resPol.setdSpaceObject(item);
resPol.setEPerson(item.getSubmitter());
context.restoreAuthSystemState();
}

Expand Down
Loading
Loading