Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
let369 committed Jan 12, 2024
2 parents dd0c08e + 4d5ae19 commit d2ac10a
Show file tree
Hide file tree
Showing 46 changed files with 119 additions and 87 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Bloomreach Forge Embargo Plugin
Copyright 2015-2022 Bloomreach B.V. (http://www.bloomreach.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)

This product includes software developed by:
Bloomreach B.V., Amsterdam, The Netherlands (http://www.bloomreach.com/);
Expand Down
4 changes: 2 additions & 2 deletions cms/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@
<parent>
<groupId>org.bloomreach.forge.embargo</groupId>
<artifactId>embargo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>Bloomreach Embargo Plugin CMS</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import javax.jcr.Node;
import javax.jcr.RepositoryException;
Expand Down Expand Up @@ -240,7 +241,12 @@ protected Component getIcon(final String id) {

private void addSetEmbargoOption() {
final IModel<String> nameModel = new StringResourceModel("set-embargo-label", this, null);
if (EmbargoUtils.isAdminUser(getJcrSession(), getJcrSession().getUserID())) {

final boolean isAdminUser = EmbargoUtils.isAdminUser(getJcrSession(), getJcrSession().getUserID());
final boolean multiSelectEnabled = getPluginConfig().getAsBoolean("multiSelectEnabled", false);
final String[] currentUserEmbargoEnabledGroups = EmbargoUtils.getCurrentUserEmbargoEnabledGroups(getJcrSession(), getJcrSession().getUserID());

if ( isAdminUser || (multiSelectEnabled && currentUserEmbargoEnabledGroups.length > 1)) {

add(new StdWorkflow<EmbargoWorkflow>("set", nameModel, getPluginContext(), (WorkflowDescriptorModel)getDefaultModel()) {
final ArrayList<String> selectedEmbargoGroups = new ArrayList<>();
Expand All @@ -252,7 +258,7 @@ protected IDialogService.Dialog createRequestDialog() {
return new SetEmbargoDialog(
this,
selectedEmbargoGroupsModel,
EmbargoUtils.getAllEmbargoEnabledGroups(getJcrSession()));
isAdminUser? EmbargoUtils.getAllEmbargoEnabledGroups(getJcrSession()) : List.of(currentUserEmbargoEnabledGroups));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2016 Hippo B.V. (http://www.onehippo.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion demo/cms-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-cms-dependencies</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion demo/cms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-cms</artifactId>
<packaging>war</packaging>
Expand Down
2 changes: 1 addition & 1 deletion demo/essentials/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-essentials</artifactId>
<packaging>war</packaging>
Expand Down
6 changes: 3 additions & 3 deletions demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-release</artifactId>
<version>15.0.0</version>
<version>15.4.0</version>
</parent>

<name>demo</name>
<description>demo</description>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
<packaging>pom</packaging>

<!--
Expand Down Expand Up @@ -63,7 +63,7 @@
<!--***START temporary override of versions*** -->
<!-- ***END temporary override of versions*** -->
<bloomreach.forge.embargo.version>${project.version}</bloomreach.forge.embargo.version>
<essentials.version>15.0.0</essentials.version>
<essentials.version>15.4.0</essentials.version>
<jsp-api.version>2.2</jsp-api.version>
<taglibs.version>1.2.5</taglibs.version>

Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-repository-data</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data For Application</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/development/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-repository-data</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data For Development</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/site-development/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-repository-data</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data For Site Development</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-repository-data</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data For Site</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/repository-data/webfiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-repository-data</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>demo Repository Data Web Files</name>
Expand Down
2 changes: 1 addition & 1 deletion demo/site/components/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-site</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-components</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion demo/site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-site</artifactId>
<packaging>pom</packaging>
Expand Down
4 changes: 2 additions & 2 deletions demo/site/webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.example</groupId>
<artifactId>demo-site</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>
<artifactId>demo-webapp</artifactId>
<packaging>war</packaging>
Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>org.example</groupId>
<artifactId>demo-components</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>org.onehippo.cms7.hst.toolkit-resources.addon</groupId>
Expand Down
30 changes: 10 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015-2022 Bloomreach B.V. (http://www.bloomreach.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -20,21 +20,20 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-release</artifactId>
<version>15.0.0</version>
<version>15.4.0</version>
</parent>

<name>Bloomreach Embargo Plugin</name>
<groupId>org.bloomreach.forge.embargo</groupId>
<artifactId>embargo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
<packaging>pom</packaging>
<url>https://github.com/bloomreach-forge/embargo</url>

<properties>
<junit.version>4.13.1</junit.version>

<maven.plugin.site.version>3.7</maven.plugin.site.version>
<maven.plugin.jxr.version>3.0.0</maven.plugin.jxr.version>
<maven.plugin.jxr.version>3.3.2</maven.plugin.jxr.version>
</properties>

<developers>
Expand Down Expand Up @@ -76,21 +75,16 @@
<repository>
<name>Hippo Maven 2 Repository</name>
<id>hippo-maven2-forge</id>
<url>https://maven.onehippo.com/content/repositories/forge-releases/</url>
<url>https://maven.bloomreach.com/content/repositories/forge-releases/</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>

<issueManagement>
<system>Hippo JIRA</system>
<url>https://issues.onehippo.com/projects/HIPFORGE</url>
<system>JIRA</system>
<url>https://issues.onehippo.com/projects/FORGE</url>
</issueManagement>

<ciManagement>
<system>Travic CI</system>
<url>https://travis-ci.org/bloomreach-forge/embargo</url>
</ciManagement>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
Expand Down Expand Up @@ -164,12 +158,12 @@
<repository>
<id>hippo-maven2</id>
<name>Hippo Maven 2</name>
<url>http://maven.onehippo.com/maven2</url>
<url>https://maven.bloomreach.com/maven2</url>
</repository>
<repository>
<id>hippo-maven2-forge</id>
<name>Hippo Maven 2 Forge Repositories</name>
<url>http://maven.onehippo.com/maven2-forge</url>
<url>https://maven.bloomreach.com/maven2-forge</url>
</repository>
</repositories>

Expand All @@ -179,7 +173,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.plugin.site.version}</version>
</plugin>
</plugins>
</build>
Expand All @@ -190,10 +183,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>1.8</source>
<links>
<link>http://download.oracle.com/javase/6/docs/api</link>
</links>
<source>11</source>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions repository/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2013-2022 Hippo B.V. (http://www.onehippo.com)
Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@
<parent>
<groupId>org.bloomreach.forge.embargo</groupId>
<artifactId>embargo</artifactId>
<version>7.0.0</version>
<version>7.0.1</version>
</parent>

<name>Bloomreach Embargo Plugin Repository</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013-2022 Bloomreach B.V. (http://www.bloomreach.com)
* Copyright 2024 Bloomreach B.V. (http://www.bloomreach.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit d2ac10a

Please sign in to comment.