Skip to content

Commit

Permalink
Merge pull request #1903 from TexasDigitalLibrary/4.2.6_staging
Browse files Browse the repository at this point in the history
Merge 4.2.6 staging
  • Loading branch information
cstarcher committed Feb 14, 2024
2 parents 61fb587 + c30f186 commit bbf0d30
Show file tree
Hide file tree
Showing 122 changed files with 4,531 additions and 3,527 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ dist/
!**/src/test/**

*.mv.db

### Environment Specific ###
application-*.yml
logback-*.yml
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $ mvn clean spring-boot:run -Dproduction
$ mvn clean package -DskipTests -Dproduction -Dassets.uri=file:/opt/vireo/ -Dconfig.uri=file:/opt/vireo/config/
```

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.
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.

#### Apache Reverse Proxy Config

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

```bash
$ cd /opt/vireo
$ unzip vireo-4.2.5-install.zip
$ unzip vireo-4.2.6-install.zip
```

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

```bash
$ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/vireo.war
$ cp ~/vireo-4.2.6.war /usr/local/tomcat/webapps/vireo.war
```

or as root:

```bash
$ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/ROOT.war
$ cp ~/vireo-4.2.6.war /usr/local/tomcat/webapps/ROOT.war
```

**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**
Expand All @@ -209,7 +209,7 @@ $ cp ~/vireo-4.2.5.war /usr/local/tomcat/webapps/ROOT.war
## Running WAR as a stand-alone Spring Boot application

```bash
java -jar target/vireo-4.2.5.war
java -jar target/vireo-4.2.6.war
```

<div align="right">(<a href="#readme-top">back to top</a>)</div>
Expand Down
2 changes: 1 addition & 1 deletion build/appConfig.js.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var appConfig = {

'version': '4.2.5',
'version': '4.2.6',

'allowAnonymous': true,
'anonymousRole': 'ROLE_ANONYMOUS',
Expand Down
2 changes: 1 addition & 1 deletion example.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##############################

IMAGE_HOST=127.0.0.1
IMAGE_VERSION=4.2.5
IMAGE_VERSION=4.2.6
SERVICE_PROJECT=tdl
SERVICE_PATH=vireo

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vireo",
"private": false,
"version": "4.2.5",
"version": "4.2.6",
"description": "Vireo 4",
"homepage": "https://github.com/TexasDigitalLibrary/Vireo",
"repository": {
Expand All @@ -22,13 +22,13 @@
"build": "wvr build --clean"
},
"dependencies": {
"@wvr/core": "2.2.5",
"@wvr/core": "2.2.6",
"angular-ui-tinymce": "0.0.19",
"file-saver": "2.0.5",
"ng-csv": "0.3.6",
"ng-sortable": "1.3.8",
"ng-table": "3.1.0",
"tinymce": "5.10.7"
"tinymce": "5.10.9"
},
"overrides": {
"debug": "4.3.4",
Expand Down
15 changes: 12 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.tdl</groupId>
<artifactId>vireo</artifactId>
<version>4.2.5</version>
<version>4.2.6</version>

<name>Vireo</name>
<description>Vireo Thesis and Dissertation Submission System</description>
Expand All @@ -20,12 +20,13 @@
<parent>
<groupId>edu.tamu.weaver</groupId>
<artifactId>webservice-parent</artifactId>
<version>2.1.1-RC19</version>
<version>2.1.1</version>
<relativePath/>
</parent>

<properties>
<java.version>11</java.version>
<maven.compiler.release>${java.version}</maven.compiler.release>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -222,6 +223,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down Expand Up @@ -581,7 +588,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>assembly.xml</descriptor>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
<executions>
Expand Down
27 changes: 16 additions & 11 deletions src/main/java/org/tdl/vireo/ApplicationInitialization.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
package org.tdl.vireo;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Profile;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.stereotype.Component;
import org.tdl.vireo.service.EntityControlledVocabularyService;
import org.tdl.vireo.service.SystemDataLoader;

@Order(Ordered.HIGHEST_PRECEDENCE)
@Component
@Profile("!test")
public class ApplicationInitialization implements CommandLineRunner {
@Component("ApplicationInitialization")
public class ApplicationInitialization implements InitializingBean {

@Autowired
private Environment env;

@Lazy
@Autowired
Expand All @@ -24,11 +27,13 @@ public class ApplicationInitialization implements CommandLineRunner {
private EntityControlledVocabularyService entityControlledVocabularyService;

@Override
public void run(String... args) throws Exception {
// load defaults first
systemDataLoader.loadSystemData();
// assumes one language defined in defaults
entityControlledVocabularyService.scanForEntityControlledVocabularies();
public void afterPropertiesSet() throws Exception {
if (env.acceptsProfiles(Profiles.of("!isolated-test"))) {
// load defaults first
systemDataLoader.loadSystemData();
// assumes one language defined in defaults
entityControlledVocabularyService.scanForEntityControlledVocabularies();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public ApiResponse registration(@RequestBody(required = false) Map<String, Strin
content = cryptoService.validateGenericToken(token, EMAIL_VERIFICATION_TYPE);
} catch (InvalidKeyException | NoSuchAlgorithmException | NoSuchPaddingException | IllegalBlockSizeException | BadPaddingException e) {
logger.debug("Unable to validate token!");
return new ApiResponse(ERROR, "Unable to generate token!");
return new ApiResponse(ERROR, "Unable to validate token!");
}

String tokenCreateTime = content[0];
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/tdl/vireo/config/AppEmailConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import edu.tamu.weaver.email.service.EmailSender;

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

@Bean
Expand Down
22 changes: 15 additions & 7 deletions src/main/java/org/tdl/vireo/controller/OrganizationController.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@
import static org.springframework.beans.BeanUtils.copyProperties;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import edu.tamu.weaver.response.ApiResponse;
import edu.tamu.weaver.response.ApiView;
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidatedModel;
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidation;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down Expand Up @@ -47,6 +42,15 @@
import org.tdl.vireo.view.ShallowOrganizationView;
import org.tdl.vireo.view.TreeOrganizationView;

import com.fasterxml.jackson.annotation.JsonView;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import edu.tamu.weaver.response.ApiResponse;
import edu.tamu.weaver.response.ApiView;
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidatedModel;
import edu.tamu.weaver.validation.aspect.annotation.WeaverValidation;

@RestController
@RequestMapping("/organization")
public class OrganizationController {
Expand Down Expand Up @@ -253,6 +257,10 @@ public ApiResponse addEmailWorkflowRule(@PathVariable Long requestingOrgId, @Req
EmailWorkflowRule newEmailWorkflowRule = emailWorkflowRuleRepo.create(submissionStatus, emailRecipient, emailTemplate);
org.addEmailWorkflowRule(newEmailWorkflowRule);
organizationRepo.update(org);

HashMap<String, Object> payload = new HashMap<String, Object>();
payload.put("id", newEmailWorkflowRule.getId());
response.setPayload(payload);
}

return response;
Expand Down
Loading

0 comments on commit bbf0d30

Please sign in to comment.