Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 9b9d5e9

Browse files
author
sowerstl
committed
Fix when User cannot edit if Project Keywords set; (DOECODE-800)
1 parent 2a3248d commit 9b9d5e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/gov/osti/services/Metadata.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ public Response getSingleRecord(@PathParam("codeId") Long codeId, @QueryParam("f
351351
.forbidden("Permission denied.")
352352
.build();
353353

354+
// if user is not admin, remove Project Keywords from the result.
355+
if (!user.hasRole("RecordAdmin"))
356+
md.setProjectKeywords(null);
357+
354358
// if YAML is requested, return that; otherwise, default to JSON
355359
try {
356360
if ("yaml".equals(format)) {

0 commit comments

Comments
 (0)