Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
f832e3f5
Commit
f832e3f5
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
4d61a80f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!111
Release 0.12.1
,
!109
F select acl
Pipeline
#44382
failed
1 year ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/caosdb/server/database/backend/transaction/RetrieveFullEntityTransaction.java
+9
-0
9 additions, 0 deletions
...se/backend/transaction/RetrieveFullEntityTransaction.java
with
9 additions
and
0 deletions
src/main/java/org/caosdb/server/database/backend/transaction/RetrieveFullEntityTransaction.java
+
9
−
0
View file @
f832e3f5
...
...
@@ -26,6 +26,7 @@ package org.caosdb.server.database.backend.transaction;
import
java.util.LinkedList
;
import
java.util.List
;
import
org.apache.shiro.SecurityUtils
;
import
org.caosdb.server.database.BackendTransaction
;
import
org.caosdb.server.database.exceptions.EntityDoesNotExistException
;
import
org.caosdb.server.datatype.CollectionValue
;
...
...
@@ -38,6 +39,8 @@ import org.caosdb.server.entity.RetrieveEntity;
import
org.caosdb.server.entity.Role
;
import
org.caosdb.server.entity.container.Container
;
import
org.caosdb.server.entity.wrapper.Property
;
import
org.caosdb.server.permissions.EntityACL
;
import
org.caosdb.server.permissions.EntityPermission
;
import
org.caosdb.server.query.Query
;
import
org.caosdb.server.query.Query.Selection
;
import
org.caosdb.server.utils.EntityStatus
;
...
...
@@ -220,6 +223,12 @@ public class RetrieveFullEntityTransaction extends BackendTransaction {
private
void
resolveReferenceValue
(
final
ReferenceValue
value
,
final
List
<
Selection
>
selections
,
final
String
propertyName
)
{
final
RetrieveEntity
ref
=
new
RetrieveEntity
(
value
.
getId
());
// check whether the referenced entity may be retrieved
final
EntityACL
entityACL
=
ref
.
getEntityACL
();
if
(!
entityACL
.
isPermitted
(
SecurityUtils
.
getSubject
(),
EntityPermission
.
RETRIEVE_ENTITY
))
{
return
;
}
// recursion! (Only for the matching selections)
retrieveFullEntity
(
ref
,
getSubSelects
(
selections
,
propertyName
));
value
.
setEntity
(
ref
,
true
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment