mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00
[DURACOM-357] improved check for authorization on objects in ItemConverter
(cherry picked from commit a70dede20b
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
b74c4b958f
commit
371d470891
@@ -76,7 +76,7 @@ public class ItemConverter
|
|||||||
try {
|
try {
|
||||||
if (obj.isWithdrawn() && (Objects.isNull(context) ||
|
if (obj.isWithdrawn() && (Objects.isNull(context) ||
|
||||||
Objects.isNull(context.getCurrentUser()) ||
|
Objects.isNull(context.getCurrentUser()) ||
|
||||||
!(authorizeService.isAdmin(context) || authorizeService.isCollectionAdmin(context)))) {
|
!(authorizeService.isAdmin(context) || authorizeService.isAdmin(context, obj)))) {
|
||||||
return new MetadataValueList(List.of());
|
return new MetadataValueList(List.of());
|
||||||
}
|
}
|
||||||
if (context != null && (authorizeService.isAdmin(context) || itemService.canEdit(context, obj))) {
|
if (context != null && (authorizeService.isAdmin(context) || itemService.canEdit(context, obj))) {
|
||||||
|
Reference in New Issue
Block a user