Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
fb76b54
test: verify basic db cache reloading
aatkin Jan 28, 2025
671f1e4
fix: use test names for CircleCI test splitting
aatkin Jan 28, 2025
dbba1dd
tools: store CI artifacts from kaocha test runs
aatkin Jan 28, 2025
3f898a2
feat: remove cache hit statistics
aatkin Jan 28, 2025
5cf0c52
chore: re-require rems.main in browser tests
aatkin Jan 29, 2025
c107eee
fix: properly format audit log response
Macroz Jul 2, 2025
a2ade30
doc: update CHANGELOG
Macroz Jul 2, 2025
96ead79
Update README.md
meericsc Jul 23, 2025
26dbf97
fix: properly format audit log response
Macroz Jul 2, 2025
c1da00b
doc: update CHANGELOG
Macroz Jul 2, 2025
bd48825
fix: temporary fix to cprop to enable JVM 25 support
Macroz Oct 27, 2025
6696188
Merge branch 'fix-audit-log-api' into fix-cprop-for-jvm-25
Macroz Oct 27, 2025
e7ba967
fix: force casting to long because reflection no longer works
Macroz Oct 28, 2025
c875d44
doc: update CHANGELOG
Macroz Oct 28, 2025
2128861
fix: links
pikariop Oct 30, 2025
28c8dd4
Merge pull request #3390 from CSCfi/fix-markdown-links
pikariop Oct 31, 2025
d310b9f
filter out existing members from the 'Add member' dropdown menu
vuorioma Oct 31, 2025
8f5db3b
remove print statement
vuorioma Oct 31, 2025
83d64c0
filter out existing members from the 'Add member' dropdown menu
vuorioma Oct 31, 2025
cc019fc
filter out existing members from the 'Add member' dropdown menu
vuorioma Oct 31, 2025
c3bc011
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 4, 2025
3c54890
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 4, 2025
eb59024
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 4, 2025
6b8974f
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 5, 2025
9f970de
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 5, 2025
c092d72
CHANGELOG.md: filter out existing members from the 'Add member' dropd…
vuorioma Nov 5, 2025
f2efc4c
fix: hide edit buttons when organization owner is not allowed to modi…
pikariop Nov 5, 2025
3cc4a53
Update changelog
pikariop Nov 5, 2025
e146a0c
Remove unused require
pikariop Nov 5, 2025
0cfa274
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 6, 2025
3829cca
filter out existing members from the 'Add member' dropdown menu
vuorioma Nov 6, 2025
c05e98c
Merge pull request #3391 from CSCfi/filter-dropdown-members
vuorioma Nov 6, 2025
0da46bd
Improve wording
pikariop Nov 6, 2025
c8cbf18
Hide `Manage categories` along with other edit functionality
pikariop Nov 6, 2025
13377b9
Merge pull request #3396 from CSCfi/hide-invalid-edit-button
pikariop Nov 6, 2025
f3e7708
Remove en dash if title is empty
vuorioma Nov 12, 2025
7c65afa
Remove en dash if title is empty
vuorioma Nov 13, 2025
fef8295
Remove en dash if title is empty
vuorioma Nov 13, 2025
55e0606
CHANGELOG.md: Remove en dash if title is empty
vuorioma Nov 13, 2025
9c2a7b7
Remove en dash if title is empty
vuorioma Nov 17, 2025
a2ecec5
Remove en dash if title is empty
vuorioma Nov 17, 2025
cc951c2
Merge remote-tracking branch 'origin' into cache-reload-tests
vuorioma Nov 18, 2025
26439cc
Merge pull request #3373 from CSCfi/cache-reload-tests
vuorioma Nov 18, 2025
acbdc1f
test: when editing an organization without being the owner, edit butt…
pikariop Nov 13, 2025
b4d3403
test: when editing a license without being the owner, edit button is …
pikariop Nov 17, 2025
bdf8d8c
Simplify test by using the default organization
pikariop Nov 18, 2025
f2bfbc3
Update CHANGELOG.md
vuorioma Nov 18, 2025
fa25492
Merge remote-tracking branch 'origin/master' into ci-improvements
vuorioma Nov 18, 2025
7665a0a
Merge pull request #3374 from CSCfi/ci-improvements
vuorioma Nov 18, 2025
2f26f04
test: when viewing catalogue items as owner of another organization, …
pikariop Nov 19, 2025
bd4018b
test: when viewing workflows as owner of another organization, edit f…
pikariop Nov 20, 2025
418cbb2
Wait until form field is visible
pikariop Nov 20, 2025
b39b96e
test: when viewing forms as owner of another organization, edit funct…
pikariop Nov 20, 2025
d789e5a
Clarify test output by unthreading `(= expected actual)`
pikariop Nov 20, 2025
6c5dc8c
chore(deps-dev): bump cipher-base from 1.0.4 to 1.0.6
dependabot[bot] Nov 21, 2025
7de75ae
Merge pull request #3384 from CSCfi/dependabot/npm_and_yarn/cipher-ba…
vuorioma Nov 21, 2025
343680e
chore(deps-dev): bump sha.js from 2.4.11 to 2.4.12
dependabot[bot] Nov 21, 2025
3a0bf68
Merge pull request #3385 from CSCfi/dependabot/npm_and_yarn/sha.js-2.…
vuorioma Nov 21, 2025
44548ac
chore(deps): bump tmp from 0.2.1 to 0.2.5
dependabot[bot] Nov 21, 2025
2411fd6
Disable `Update catalogue item` button when user is not permitted to …
pikariop Nov 24, 2025
0659206
test: edit functionality is hidden when viewing catalogue items as ow…
pikariop Nov 24, 2025
4bb8416
Merge pull request #3386 from CSCfi/dependabot/npm_and_yarn/tmp-0.2.5
vuorioma Nov 25, 2025
dbb430a
Merge pull request #3399 from CSCfi/remove-en-dash-if-title-is-empty
vuorioma Nov 25, 2025
204c615
Add http-level test for audit log response status
pikariop Nov 28, 2025
ecfd3b0
Merge branch 'master' into fix-audit-log-api
Macroz Nov 28, 2025
7a109cb
Improve readability
pikariop Dec 1, 2025
626af2e
Merge pull request #3400 from CSCfi/test-hide-invalid-edit-button
pikariop Dec 1, 2025
3f248be
Merge pull request #3381 from CSCfi/fix-audit-log-api
Macroz Dec 1, 2025
91446e6
Merge pull request #3389 from CSCfi/fix-cprop-for-jvm-25
pikariop Dec 2, 2025
3fb89d1
Fix flaky test by waiting until page is loaded
pikariop Dec 2, 2025
6d5a1e5
Merge pull request #3405 from CSCfi/fix-test-update-catalogue-item
pikariop Dec 2, 2025
4290408
fix: catalogue table row-commands
Macroz Dec 11, 2025
f918beb
doc: update CHANGELOG
Macroz Dec 11, 2025
dcf5808
Merge pull request #3409 from CSCfi/fix-catalogue-table-command
Macroz Dec 11, 2025
bb791bb
docker-build
flashguerdon Jul 6, 2025
9e0604c
private keys
flashguerdon Jul 7, 2025
fb93e31
update entrypoint
flashguerdon Jul 7, 2025
a17f0b7
config template
flashguerdon Jul 8, 2025
bda5713
latest tag
flashguerdon Jul 8, 2025
3203e3f
envsubst
flashguerdon Jul 8, 2025
fa622b7
db migrate option
flashguerdon Jul 14, 2025
1ed13b0
fix middleware order to allow API key-based POST requests without CSR…
flashguerdon Aug 3, 2025
8582acd
revert crsf order
flashguerdon Aug 3, 2025
6d5b1d0
revert debugging
flashguerdon Aug 3, 2025
cffb2e9
add curl to image
flashguerdon Aug 4, 2025
308d415
remove curl
flashguerdon Aug 4, 2025
c7a3080
logout url
flashguerdon Aug 19, 2025
7b0444d
admin tools image
flashguerdon Aug 20, 2025
d733bb3
admin tools image
flashguerdon Aug 20, 2025
6640db5
smtp config
flashguerdon Dec 1, 2025
8538aab
change footer to au biocommons
flashguerdon Dec 1, 2025
0c49c37
extra translations
flashguerdon Dec 2, 2025
0458ee8
fix dockerfile typo
flashguerdon Dec 2, 2025
efc8cb2
update to tls
flashguerdon Dec 2, 2025
59fb5c4
styles update
flashguerdon Dec 3, 2025
c4ab9ee
update dockerfile
flashguerdon Dec 3, 2025
c8d25c0
image name fix
flashguerdon Dec 3, 2025
6d8066a
image name fix
flashguerdon Dec 3, 2025
97bdf0d
Merge branch 'develop' into upstream-update
flashguerdon Dec 22, 2025
a7dd3c5
Merge pull request #17 from AustralianBioCommons/upstream-update
flashguerdon Dec 22, 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
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
- run: lein kaocha --reporter kaocha.report/documentation --plugin rems.kaocha/cache-statistics-plugin integration
- store_test_results:
path: target/test-results
- store_artifacts:
path: target/cache-statistics-plugin

browser-test:
executor: db
Expand All @@ -98,7 +100,7 @@ jobs:
at: .
- restore_cache:
key: *cache-key
- run: lein kaocha --reporter kaocha.report/documentation --plugin rems.kaocha/cache-statistics-plugin --plugin rems.kaocha/circleci-plugin browser
- run: lein kaocha --reporter kaocha.report/documentation --plugin rems.kaocha/cache-statistics-plugin --plugin rems.kaocha/circleci-parallel-plugin browser
- store_test_results:
path: target/test-results
- store_artifacts:
Expand All @@ -107,6 +109,10 @@ jobs:
path: browsertest-downloads
- store_artifacts:
path: browsertest-accessibility-report
- store_artifacts:
path: target/cache-statistics-plugin
- store_artifacts:
path: target/circleci-parallel-plugin

build:
executor: clojure
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/admin-utils-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- develop
- master
paths:
- 'adminUtils.Dockerfile'
- '.github/workflows/admin-utils-docker-build.yml'
- "adminUtils.Dockerfile"
- ".github/workflows/admin-utils-docker-build.yml"
workflow_dispatch:

permissions:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ Changes since v2.38.1
- When creating attachment license, the save button no longer activates until all attachments have been successfully uploaded. (#3292)
- Attachment upload error is indicated by small icon next to the upload button (detailed error is still shown in top of the page).
- Pending attachment upload is indicated by spinner next to the upload button.
- Edit buttons on the administration detail pages are hidden when the user is not permitted to edit, like they are hidden on the list pages already (#2814)

### Fixes
- Resolved issue where workflow voting could not be removed, which caused UI to display raw translation keys due to nil voting values. (#3357)
- Fixed an issue with the application page where the 'Add member' dropdown menu displayed members that already exist in the application. (#1412)
- Document title no longer shows an extra em dash when the localized application title is empty. (#3398)
- Fix audit log API. Technical error from incorrect response. (#3380)
- Fixes to enable JVM 25 support (https://github.com/tolitius/cprop/issues/60, https://clojure.atlassian.net/browse/CLJ-2764)
- Catalogue table had the add/remove cart commands even when not logged in. (#3408)

## v2.38.1 "Välimerenkatu +1" 2025-01-27

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ See the [release page](https://github.com/CSCfi/rems/releases) for the releases.
- We welcome [issues through GitHub](https://github.com/CSCfi/rems/issues).
- You can [contact the team on the discussion board](https://github.com/CSCfi/rems/discussions) or [via email](mailto:rems@csc.fi).
- In case you would like to contribute to the development, perhaps you participate in Hacktoberfest, then please refer to the [contributing document](CONTRIBUTING.md). We'll guide you through to get your pull request reviewed and merged.
- You can follow the progress of the project on the [GitHub project board]([https://github.com/CSCfi/rems/projects/1](https://github.com/orgs/CSCfi/projects/13)).
- You can follow the progress of the project on the [GitHub project board](https://github.com/orgs/CSCfi/projects/13/views/1).

## Documentation

Expand All @@ -43,3 +43,7 @@ You can check out the API docs using
[the swagger-ui of the public demo instance](https://rems-test.2.rahtiapp.fi/swagger-ui).

Documentation can be found under the [docs](./docs) folder.

## See Also

[REMS-COmanage bridge service](https://github.com/GUARDIANS-infrastructure/rems-co) – Service that synchronizes entitlements between REMS and a COManage registry.
3 changes: 2 additions & 1 deletion dev-config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
:heading false
:translations {:fi {:title "Mixed"
:filename "mixed-fi.md"}
:en {:url "https://example.org/en/mixed"}} ; missing sv and da
:en {:title "Mixed"
:url "https://example.org/en/mixed"}} ; missing sv and da
:show-menu false
:show-footer false}
{:id "unlocalized"
Expand Down
4 changes: 2 additions & 2 deletions docs/presentations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Here we have presentation materials for REMS. Each presentation is in the form o

## How to use – reveal.js

Follow the [https://revealjs.com/installation/#full-setup](instructions) to setup reveal.js, and off you go.
Follow the [instructions](https://revealjs.com/installation/#full-setup) to setup reveal.js, and off you go.

## How to use – CSC's training template

This is a bit more cumbersome than the previous example but does not require setting up a local web server. [https://pandoc.org](Pandoc) is required, however.
This is a bit more cumbersome than the previous example but does not require setting up a local web server. [Pandoc](https://pandoc.org) is required, however.

1. `git clone https://github.com/csc-training/slide-template`

Expand Down
51 changes: 31 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/clj/rems/api/audit_log.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns rems.api.audit-log
(:require [compojure.api.sweet :refer :all]
[rems.db.core :as db]
[ring.util.http-response :refer [ok]]
[schema.core :as s])
(:import (org.joda.time DateTime)))

Expand All @@ -23,8 +24,8 @@
{before :- (describe DateTime "Only show entries before this time") nil}]
:roles #{:reporter}
:return [AuditLogEntry]
(db/get-audit-log {:userid userid
:after after
:path (when application-id
(str "/api/applications/" application-id "%"))
:before before}))))
(ok (db/get-audit-log {:userid userid
:after after
:path (when application-id
(str "/api/applications/" application-id "%"))
:before before})))))
58 changes: 27 additions & 31 deletions src/clj/rems/cache.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(ns rems.cache
(:require [clojure.core.cache.wrapped :as w]
[clojure.tools.logging.readable :as logr]
[medley.core :refer [update-existing]]
[rems.common.util :refer [build-index]]
[rems.common.dependency :as dep]
[rems.config]))
Expand All @@ -11,8 +10,6 @@

(def ^{:doc "Value that tells cache to skip entry."} absent ::absent)

(def ^:private initial-statistics {:get 0 :reload 0 :upsert 0 :evict 0})

(defprotocol RefreshableCacheProtocol
"Protocol for cache wrapper that can refresh the underlying cache."

Expand Down Expand Up @@ -40,8 +37,6 @@

(export-statistics! [this]
"Retrieves runtime statistics from cache, and resets appropriate counters.")
(increment-get-statistic! [this]
"Increments cache access counter.")
(increment-reload-statistic! [this]
"Increments cache reload counter.")
(increment-upsert-statistic! [this]
Expand Down Expand Up @@ -73,14 +68,13 @@
CacheStatisticsProtocol

(export-statistics! [this]
(let [stats @statistics]
(reset! statistics (select-keys initial-statistics (keys stats)))
stats))
(let [value @statistics]
(reset! statistics {:reload 0 :upsert 0 :evict 0})
value))

(increment-get-statistic! [this] (swap! statistics update-existing :get inc))
(increment-reload-statistic! [this] (swap! statistics update :reload inc))
(increment-upsert-statistic! [this] (swap! statistics update :upsert inc))
(increment-evict-statistic! [this] (swap! statistics update :evict inc))
(increment-reload-statistic! [this] (some-> statistics (swap! update :reload inc)))
(increment-upsert-statistic! [this] (some-> statistics (swap! update :upsert inc)))
(increment-evict-statistic! [this] (some-> statistics (swap! update :evict inc)))

RefreshableCacheProtocol

Expand All @@ -106,8 +100,6 @@

(ensure-initialized! [this]
;; NB: reading requires no locking
(increment-get-statistic! this)

(if @initialized?
@the-cache
(reload! this)))
Expand Down Expand Up @@ -184,23 +176,27 @@
(increment-evict-statistic! this)
(logr/debug "<" id :evict k)))))

(defn basic [{:keys [depends-on id miss-fn reload-fn]}]
(defn- ensure-cache-id-unique! [id]
(when (contains? @caches id)
;; NB: even if config is not started, we default to assert
(if (:dev rems.config/env)
(logr/warnf "overriding cache id %s" id)
(assert false (format "error overriding cache id %s" id))))
(let [initialized? false
statistics (if (:dev rems.config/env)
initial-statistics
(select-keys initial-statistics [:reload :upsert :evict])) ; :get statistics can become big quickly
the-cache (w/basic-cache-factory {})
cache (->RefreshableCache id
(atom statistics)
(atom initialized?)
the-cache
miss-fn
(or reload-fn (constantly {})))]
(swap! caches assoc id cache)
(swap! caches-dag dep/depend id depends-on) ; noop when empty depends-on
(add-watch the-cache id reset-dependents-on-change!)
cache))
(assert false (format "error overriding cache id %s" id)))))

(defn basic [{:keys [depends-on id miss-fn reload-fn]}]
(or (ensure-cache-id-unique! id)
(let [initialized? false
statistics {}
the-cache (w/basic-cache-factory {})
cache (->RefreshableCache id
(atom statistics)
(atom initialized?)
the-cache
miss-fn
(or reload-fn (constantly {})))
_ (export-statistics! cache) ; NB: initializes statistics
]
(swap! caches assoc id cache)
(swap! caches-dag dep/depend id depends-on) ; noop when empty depends-on
(add-watch the-cache id reset-dependents-on-change!)
cache)))
10 changes: 9 additions & 1 deletion src/clj/rems/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[clojure.java.io :as io]
[clojure.test :refer :all]
[clojure.tools.logging :as log]
[cprop.core :refer [load-config]]
[cprop.core]
[cprop.source :as source]
[cprop.tools :refer [merge-maps]]
[medley.core :refer [update-existing]]
Expand All @@ -14,6 +14,14 @@
(:import [java.io FileNotFoundException]
[org.joda.time Period]))

(defn load-config [& args]
;; XXX: workaround for JVM 25 for cprop until fix is released https://github.com/tolitius/cprop/issues/60
(let [expand-home cprop.tools/expand-home]
(with-redefs [cprop.tools/expand-home #(if (empty? %)
nil
(expand-home %))]
(apply cprop.core/load-config args))))

(defn- file-sibling [file sibling-name]
(.getPath (io/file (.getParentFile (io/file file))
sibling-name)))
Expand Down
5 changes: 5 additions & 0 deletions src/cljc/rems/common/roles.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@
(some (comp #{(-> item :organization :organization/id)} :organization/id)))]
(or owner?
org-owner?))))

#?(:cljs
(defn show-when-can-modify-organization-item [item & body]
(when (can-modify-organization-item? item)
(into [:<> body]))))
15 changes: 13 additions & 2 deletions src/cljs/rems/actions/add_member.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,23 @@
::selected-member nil)
::fetch-potential-members #(rf/dispatch [::set-potential-members %])}))

(rf/reg-sub ::potential-members (fn [db _] (::potential-members db)))
(defn potential-members [db]
(let [application (get-in db [:rems.application/application :data])
applicant-id (get-in application [:application/applicant :userid])
members (get-in application [:application/members])
existing-ids (into #{applicant-id}
(map :userid members))]
(->> ::potential-members db
(remove (comp existing-ids :userid))
(map atoms/enrich-user))))

(rf/reg-sub ::potential-members potential-members)

(rf/reg-event-db
::set-potential-members
(fn [db [_ members]]
(assoc db
::potential-members (set (map atoms/enrich-user members))
::potential-members members
::selected-member nil)))

(rf/reg-event-db ::set-selected-member (fn [db [_ member]] (assoc db ::selected-member member)))
Expand Down
6 changes: 3 additions & 3 deletions src/cljs/rems/administration/catalogue_item.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@
(let [id (:id catalogue-item)]
[:div.col.commands
[administration/back-button "/administration/catalogue-items"]
[roles/show-when roles/+admin-write-roles+
[roles/show-when-can-modify-organization-item catalogue-item
[edit-button id]
[perform-action-button (toggle-enabled catalogue-item)]
[perform-action-button (toggle-archived catalogue-item)]]
[manage-categories-button]])])
[perform-action-button (toggle-archived catalogue-item)]
[manage-categories-button]]])])

(defn catalogue-item-page []
(let [catalogue-item (rf/subscribe [::catalogue-item])
Expand Down
4 changes: 3 additions & 1 deletion src/cljs/rems/administration/catalogue_items.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
[atoms/rate-limited-action-button
{:id :update-catalogue-item
:class "btn-primary"
:disabled (when (empty? items) :disabled)
:disabled (when (or (empty? items)
(not-every? roles/can-modify-organization-item? items))
:disabled)
:on-click (fn []
(rf/dispatch [:rems.administration.update-catalogue-item/enter-page items])
(navigate! "/administration/catalogue-items/update-catalogue-item"))
Expand Down
Loading