Skip to content

Commit bbf0d30

Browse files
authored
Merge pull request #1903 from TexasDigitalLibrary/4.2.6_staging
Merge 4.2.6 staging
2 parents 61fb587 + c30f186 commit bbf0d30

File tree

122 files changed

+4531
-3527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+4531
-3527
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,7 @@ dist/
108108
!**/src/test/**
109109

110110
*.mv.db
111+
112+
### Environment Specific ###
113+
application-*.yml
114+
logback-*.yml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $ mvn clean spring-boot:run -Dproduction
6666
$ mvn clean package -DskipTests -Dproduction -Dassets.uri=file:/opt/vireo/ -Dconfig.uri=file:/opt/vireo/config/
6767
```
6868

69-
If build succeeds, you should have both a `vireo-4.2.5.war` and a `vireo-4.2.5-install.zip` in the `target/` directory. When building for production required static assets are copied into the packaged war file and the index.html template is optimized for production. For development a symlink is used to allow the application to access required static assets.
69+
If build succeeds, you should have both a `vireo-4.2.6.war` and a `vireo-4.2.6-install.zip` in the `target/` directory. When building for production required static assets are copied into the packaged war file and the index.html template is optimized for production. For development a symlink is used to allow the application to access required static assets.
7070

7171
#### Apache Reverse Proxy Config
7272

@@ -117,7 +117,7 @@ Unzip package into preferred directory (or any directory you choose):
117117

118118
```bash
119119
$ cd /opt/vireo
120-
$ unzip vireo-4.2.5-install.zip
120+
$ unzip vireo-4.2.6-install.zip
121121
```
122122

123123
### Directory Structure of installed package
@@ -190,13 +190,13 @@ ln -s /opt/vireo/webapp /opt/tomcat/webapps/ROOT
190190
Copy war file into Tomcat webapps directory (your location may vary -- this is an example):
191191

192192
```bash
193-
$ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/vireo.war
193+
$ cp ~/vireo-4.2.6.war /usr/local/tomcat/webapps/vireo.war
194194
```
195195

196196
or as root:
197197

198198
```bash
199-
$ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/ROOT.war
199+
$ cp ~/vireo-4.2.6.war /usr/local/tomcat/webapps/ROOT.war
200200
```
201201

202202
**if not specifying assets.uri during build the assets will be stored under the vireo webapp's classpath, /opt/tomcat/webapps/vireo/WEB-INF/classes**
@@ -209,7 +209,7 @@ $ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/ROOT.war
209209
## Running WAR as a stand-alone Spring Boot application
210210

211211
```bash
212-
java -jar target/vireo-4.2.5.war
212+
java -jar target/vireo-4.2.6.war
213213
```
214214

215215
<div align="right">(<a href="#readme-top">back to top</a>)</div>

build/appConfig.js.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var appConfig = {
22

3-
'version': '4.2.5',
3+
'version': '4.2.6',
44

55
'allowAnonymous': true,
66
'anonymousRole': 'ROLE_ANONYMOUS',

example.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##############################
55

66
IMAGE_HOST=127.0.0.1
7-
IMAGE_VERSION=4.2.5
7+
IMAGE_VERSION=4.2.6
88
SERVICE_PROJECT=tdl
99
SERVICE_PATH=vireo
1010

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vireo",
33
"private": false,
4-
"version": "4.2.5",
4+
"version": "4.2.6",
55
"description": "Vireo 4",
66
"homepage": "https://github.com/TexasDigitalLibrary/Vireo",
77
"repository": {
@@ -22,13 +22,13 @@
2222
"build": "wvr build --clean"
2323
},
2424
"dependencies": {
25-
"@wvr/core": "2.2.5",
25+
"@wvr/core": "2.2.6",
2626
"angular-ui-tinymce": "0.0.19",
2727
"file-saver": "2.0.5",
2828
"ng-csv": "0.3.6",
2929
"ng-sortable": "1.3.8",
3030
"ng-table": "3.1.0",
31-
"tinymce": "5.10.7"
31+
"tinymce": "5.10.9"
3232
},
3333
"overrides": {
3434
"debug": "4.3.4",

pom.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.tdl</groupId>
88
<artifactId>vireo</artifactId>
9-
<version>4.2.5</version>
9+
<version>4.2.6</version>
1010

1111
<name>Vireo</name>
1212
<description>Vireo Thesis and Dissertation Submission System</description>
@@ -20,12 +20,13 @@
2020
<parent>
2121
<groupId>edu.tamu.weaver</groupId>
2222
<artifactId>webservice-parent</artifactId>
23-
<version>2.1.1-RC19</version>
23+
<version>2.1.1</version>
2424
<relativePath/>
2525
</parent>
2626

2727
<properties>
2828
<java.version>11</java.version>
29+
<maven.compiler.release>${java.version}</maven.compiler.release>
2930
<maven.compiler.source>${java.version}</maven.compiler.source>
3031
<maven.compiler.target>${java.version}</maven.compiler.target>
3132
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -222,6 +223,12 @@
222223
<scope>test</scope>
223224
</dependency>
224225

226+
<dependency>
227+
<groupId>org.springframework.security</groupId>
228+
<artifactId>spring-security-test</artifactId>
229+
<scope>test</scope>
230+
</dependency>
231+
225232
<dependency>
226233
<groupId>org.mockito</groupId>
227234
<artifactId>mockito-core</artifactId>
@@ -581,7 +588,9 @@
581588
<groupId>org.apache.maven.plugins</groupId>
582589
<artifactId>maven-assembly-plugin</artifactId>
583590
<configuration>
584-
<descriptor>assembly.xml</descriptor>
591+
<descriptors>
592+
<descriptor>assembly.xml</descriptor>
593+
</descriptors>
585594
<finalName>${project.artifactId}-${project.version}</finalName>
586595
</configuration>
587596
<executions>
Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
package org.tdl.vireo;
22

3+
import org.springframework.beans.factory.InitializingBean;
34
import org.springframework.beans.factory.annotation.Autowired;
4-
import org.springframework.core.Ordered;
5-
import org.springframework.boot.CommandLineRunner;
65
import org.springframework.context.annotation.Lazy;
7-
import org.springframework.context.annotation.Profile;
6+
import org.springframework.core.Ordered;
87
import org.springframework.core.annotation.Order;
8+
import org.springframework.core.env.Environment;
9+
import org.springframework.core.env.Profiles;
910
import org.springframework.stereotype.Component;
1011
import org.tdl.vireo.service.EntityControlledVocabularyService;
1112
import org.tdl.vireo.service.SystemDataLoader;
1213

1314
@Order(Ordered.HIGHEST_PRECEDENCE)
14-
@Component
15-
@Profile("!test")
16-
public class ApplicationInitialization implements CommandLineRunner {
15+
@Component("ApplicationInitialization")
16+
public class ApplicationInitialization implements InitializingBean {
17+
18+
@Autowired
19+
private Environment env;
1720

1821
@Lazy
1922
@Autowired
@@ -24,11 +27,13 @@ public class ApplicationInitialization implements CommandLineRunner {
2427
private EntityControlledVocabularyService entityControlledVocabularyService;
2528

2629
@Override
27-
public void run(String... args) throws Exception {
28-
// load defaults first
29-
systemDataLoader.loadSystemData();
30-
// assumes one language defined in defaults
31-
entityControlledVocabularyService.scanForEntityControlledVocabularies();
30+
public void afterPropertiesSet() throws Exception {
31+
if (env.acceptsProfiles(Profiles.of("!isolated-test"))) {
32+
// load defaults first
33+
systemDataLoader.loadSystemData();
34+
// assumes one language defined in defaults
35+
entityControlledVocabularyService.scanForEntityControlledVocabularies();
36+
}
3237
}
3338

3439
}

src/main/java/org/tdl/vireo/auth/controller/AuthController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public ApiResponse registration(@RequestBody(required = false) Map<String, Strin
133133
content = cryptoService.validateGenericToken(token, EMAIL_VERIFICATION_TYPE);
134134
} catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException | BadPaddingException e) {
135135
logger.debug("Unable to validate token!");
136-
return new ApiResponse(ERROR, "Unable to generate token!");
136+
return new ApiResponse(ERROR, "Unable to validate token!");
137137
}
138138

139139
String tokenCreateTime = content[0];

src/main/java/org/tdl/vireo/config/AppEmailConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import edu.tamu.weaver.email.service.EmailSender;
1010

1111
@Configuration
12-
@Profile(value = { "!test" })
12+
@Profile(value = { "!test", "!isolated-test" })
1313
public class AppEmailConfig extends WeaverEmailConfig {
1414

1515
@Bean

src/main/java/org/tdl/vireo/controller/OrganizationController.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,10 @@
99
import static org.springframework.beans.BeanUtils.copyProperties;
1010
import static org.springframework.web.bind.annotation.RequestMethod.POST;
1111

12-
import com.fasterxml.jackson.annotation.JsonView;
13-
import com.fasterxml.jackson.databind.JsonNode;
14-
import com.fasterxml.jackson.databind.ObjectMapper;
15-
import edu.tamu.weaver.response.ApiResponse;
16-
import edu.tamu.weaver.response.ApiView;
17-
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidatedModel;
18-
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidation;
12+
import java.util.HashMap;
1913
import java.util.Map;
2014
import java.util.Optional;
15+
2116
import org.springframework.beans.factory.annotation.Autowired;
2217
import org.springframework.security.access.prepost.PreAuthorize;
2318
import org.springframework.web.bind.annotation.PathVariable;
@@ -47,6 +42,15 @@
4742
import org.tdl.vireo.view.ShallowOrganizationView;
4843
import org.tdl.vireo.view.TreeOrganizationView;
4944

45+
import com.fasterxml.jackson.annotation.JsonView;
46+
import com.fasterxml.jackson.databind.JsonNode;
47+
import com.fasterxml.jackson.databind.ObjectMapper;
48+
49+
import edu.tamu.weaver.response.ApiResponse;
50+
import edu.tamu.weaver.response.ApiView;
51+
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidatedModel;
52+
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidation;
53+
5054
@RestController
5155
@RequestMapping("/organization")
5256
public class OrganizationController {
@@ -253,6 +257,10 @@ public ApiResponse addEmailWorkflowRule(@PathVariable Long requestingOrgId, @Req
253257
EmailWorkflowRule newEmailWorkflowRule = emailWorkflowRuleRepo.create(submissionStatus, emailRecipient, emailTemplate);
254258
org.addEmailWorkflowRule(newEmailWorkflowRule);
255259
organizationRepo.update(org);
260+
261+
HashMap<String, Object> payload = new HashMap<String, Object>();
262+
payload.put("id", newEmailWorkflowRule.getId());
263+
response.setPayload(payload);
256264
}
257265

258266
return response;

0 commit comments

Comments
 (0)