Skip to content

Commit

Permalink
Merge branch 'release/2024.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
PenghaiZhang committed Dec 16, 2024
2 parents dc764a6 + c007046 commit c95b915
Show file tree
Hide file tree
Showing 386 changed files with 12,949 additions and 4,429 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ issue here (not in the title) so as to utilise automatic linking.

<!-- Reference Links -->

[contributor license agreement]: https://www.apereo.org/node/676
[contributor license agreement]: https://www.apereo.org/about/governance/licensing
[commit guidelines]: https://chris.beams.io/posts/git-commit/
39 changes: 20 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

jobs:
build_and_check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -123,13 +123,13 @@ jobs:
target/*.zip
- name: Save primary artefacts
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: Artefacts
path: artefacts.tar

build_storybook:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
# Using v1 (rather than v2) through-out this workflow due to issue:
# https://github.com/actions/checkout/issues/237
Expand Down Expand Up @@ -174,15 +174,15 @@ jobs:
tar cvf storybook.tar storybook-static
- name: Save Static Storybook instance
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: Storybook
path: react-front-end/storybook.tar

functional_testing:
needs: build_and_check

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
Expand Down Expand Up @@ -213,6 +213,7 @@ jobs:
AUTOTEST_CONFIG: autotest/github-actions.conf
EQ_EXIFTOOL_PATH: /usr/bin/exiftool
OLD_TEST_NEWUI: ${{ matrix.newui }}
MATRIX_ID: ${{ matrix.newui && 'NEWUI' || 'OLDUI' }}-psql_${{ matrix.pgsql-image }}

steps:
- name: Install OS dependencies
Expand All @@ -236,7 +237,7 @@ jobs:
node-version-file: '.nvmrc'

- name: Download Artefacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: Artefacts
name: Artefacts
Expand All @@ -263,9 +264,9 @@ jobs:
- name: Save Scalacheck results
if: matrix.newui && failure()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: ScalacheckReports
name: ScalacheckReports-${{ env.MATRIX_ID }}
path: autotest/Tests/target/test-reports

- name: Run TestNG tests
Expand All @@ -274,23 +275,23 @@ jobs:
- name: Save TestNG Reports
if: failure()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: TestNGReports-new-${{ matrix.newui }}
name: TestNGReports-${{ env.MATRIX_ID }}
path: autotest/OldTests/target/testng

- name: Save oEQ Logs
if: failure()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: oEQLogs-new-${{ matrix.newui }}
name: oEQLogs-${{ env.MATRIX_ID }}
path: autotest/equella-install/logs

- name: Save Screenshots
if: failure()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: Screenshots-new-${{ matrix.newui }}
name: Screenshots-${{ env.MATRIX_ID }}
path: autotest/Tests/target/test-reports/screenshots

- name: Generate coverage report
Expand All @@ -305,15 +306,15 @@ jobs:
tar cvf coverage_report.tar autotest/target/coverage-report/
- name: Save Coverage Report
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: CoverageReport-newui-${{ matrix.newui }}
name: CoverageReport-${{ env.MATRIX_ID }}
path: coverage_report.tar

rest-module-testing:
needs: build_and_check

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

services:
postgres:
Expand Down Expand Up @@ -356,7 +357,7 @@ jobs:
node-version-file: '.nvmrc'

- name: Download installer
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
path: Artefacts
name: Artefacts
Expand Down Expand Up @@ -387,7 +388,7 @@ jobs:
- name: Save oEQ logs for REST Module
if: failure()
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4.4.0
with:
name: oEQ-logs-rest-module
path: autotest/equella-install/logs
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include:
project: edalex-group/development/oeq/openequella-ci
file: build/main.yml
ref: build/pre-2024.2
ref: main
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ When you submit an issue, please take the time to provide as much info as you ca
As per standard Apereo projects: If you wish to contribute to openEQUELLA itself, you should first
subscribe to the openEQUELLA Google Group as outlined above and discuss your contributions with
the other developers. You will also need to sign a
[Contributor License Agreement](https://www.apereo.org/node/676).
[Contributor License Agreement](https://www.apereo.org/about/governance/licensing).

But after that, as per usual GitHub, please first fork the project and then branch off `develop` or a
stable branch (see below) to use a 'feature' branch. Branches should follow the naming convention of:
Expand Down
2 changes: 1 addition & 1 deletion Installer/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Path.relativeTo

libraryDependencies ++= Seq(
"com.google.guava" % "guava" % "32.1.3-jre",
"commons-codec" % "commons-codec" % "1.16.1",
"commons-codec" % "commons-codec" % "1.17.0",
postgresDep,
sqlServerDep
)
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright <2023>, The Apereo Foundation
Copyright <2024>, The Apereo Foundation

This project includes software developed by The Apereo Foundation.
http://www.apereo.org/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,25 @@ public Map<String, String> getAttributesForNode(final String path) {
}
}

/**
* Sets an attribute on the XML node.
*
* <p>For example, if the XML is: {@code <xml> <item/> </xml> } And with `setAttribute("/item",
* "name", "value")`, the result is: {@code <xml> <item name="value"/> </xml> }
*
* @param path The path to the node.
* @param attribute The name of the attribute.
* @param value The value of the attribute.
*/
public void setAttribute(String path, String attribute, String value) {
ensureRoot();
checkNotAttribute(path);

final Node node = getNodeHelper(path, false, false);
Element element = (Element) node;
element.setAttribute(attribute, value);
}

private void mergeHelper(final Element dst, final Element src) {
final NodeList oChildNodes = src.getChildNodes();
boolean bHasElem = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ public String getToolTipText(MouseEvent event) {

@Override
public void load(HierarchyPack pack) {
selectedModel.setEntries(pack.getTopic().getKeyResources());
selectedModel.setEntries(pack.getKeyResources());
}

@Override
public void save(HierarchyPack pack) {
pack.getTopic().setKeyResources(selectedModel.getEntries());
pack.setKeyResources(selectedModel.getEntries());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Apereo Foundation licenses this file to you under the Apache License,
* Version 2.0, (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.tle.common.util

import java.security.SecureRandom

object StringUtils {

private val secureRandom = SecureRandom.getInstanceStrong

/**
* Generates a string of random bytes represented as hexadecimal values.
*
* @param length number of random bytes
* @return a string which is twice the length of `length` with each two characters representing
* one byte
*/
def generateRandomHexString(length: Int): String =
Range(0, length).map(_ => "%02x".format(secureRandom.nextInt(255))).mkString
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ public final class WebConstants {
public static final String DASHBOARD_PAGE = "home.do";
public static final String DASHBOARD_PAGE_PRIVILEGE = "DASHBOARD_PAGE";

public static final String LOGIN_PAGE = "logon.do";

public static final String SEARCHING_PAGE = "searching.do";
public static final String SEARCH_PAGE_PRIVILEGE = "SEARCH_PAGE";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@

import com.tle.beans.entity.Schema;
import com.tle.beans.entity.itemdef.ItemDefinition;
import com.tle.beans.item.Item;
import com.tle.common.security.TargetList;
import java.io.Serializable;
import java.util.List;

/** @author Nicholas Read */
public class HierarchyPack implements Serializable {
private static final long serialVersionUID = 1L;

private HierarchyTopic topic;
private List<Item> keyResources;
private TargetList targetList;
private List<ItemDefinition> inheritedItemDefinitions;
private List<Schema> inheritedSchemas;
Expand Down Expand Up @@ -61,6 +62,14 @@ public void setTopic(HierarchyTopic topic) {
this.topic = topic;
}

public void setKeyResources(List<Item> keyResources) {
this.keyResources = keyResources;
}

public List<Item> getKeyResources() {
return this.keyResources;
}

public TargetList getTargetList() {
return targetList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
import com.tle.beans.SchemaScript;
import com.tle.beans.entity.LanguageBundle;
import com.tle.beans.entity.PowerSearch;
import com.tle.beans.item.Item;
import com.tle.common.Check;
import com.tle.common.Check.FieldEquality;
import com.tle.common.DoNotClone;
import com.tle.common.institution.TreeNodeInterface;
import java.io.Serializable;
import java.util.ArrayList;
Expand Down Expand Up @@ -96,14 +94,6 @@ public class HierarchyTopic
@Index(name = "hiearchyPowerSearch")
private PowerSearch advancedSearch;

/** ItemId keys. */
@DoNotClone
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(
joinColumns = {@JoinColumn(name = "hierarchy_topic_id")},
inverseJoinColumns = {@JoinColumn(name = "element")})
private List<Item> keyResources;

private boolean showResults = true;

@Column(length = 100)
Expand Down Expand Up @@ -266,14 +256,6 @@ public void setAdvancedSearch(PowerSearch advancedSearch) {
this.advancedSearch = advancedSearch;
}

public List<Item> getKeyResources() {
return keyResources;
}

public void setKeyResources(List<Item> keyResources) {
this.keyResources = keyResources;
}

public List<ItemDefinitionScript> getAdditionalItemDefs() {
return addIdefs;
}
Expand Down
Loading

0 comments on commit c95b915

Please sign in to comment.