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
2ac1efde
Commit
2ac1efde
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
FIX: filter internal entities
parent
dcd5765c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!65
F permission checks
Pipeline
#26399
failed
2 years ago
Stage: info
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/query/Query.java
+9
-6
9 additions, 6 deletions
src/main/java/org/caosdb/server/query/Query.java
with
9 additions
and
6 deletions
src/main/java/org/caosdb/server/query/Query.java
+
9
−
6
View file @
2ac1efde
...
...
@@ -758,7 +758,7 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
}
this
.
resultSet
=
filterEntitiesWithoutRetrievePermission
(
this
.
resultSet
);
removeInternalEntitiesFromResultSet
();
this
.
resultSet
=
removeInternalEntitiesFromResultSet
();
fillContainerWithResult
();
}
catch
(
final
SQLException
e
)
{
e
.
printStackTrace
();
...
...
@@ -773,13 +773,16 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
}
/** There are internal Entities (with ID<100) that should never be returned * */
private
void
removeInternalEntitiesFromResultSet
()
{
for
(
final
IdVersionAclTriplet
t
:
resultSet
)
{
// ignore internal entities
if
(
t
.
id
<
100
)
{
resultSet
.
remove
(
t
);
private
List
<
IdVersionAclTriplet
>
removeInternalEntitiesFromResultSet
()
{
final
List
<
IdVersionAclTriplet
>
filtered
=
new
ArrayList
<>();
for
(
final
IdVersionAclTriplet
triplet
:
resultSet
)
{
if
(
triplet
.
id
>=
100
)
{
filtered
.
add
(
triplet
);
}
}
return
filtered
;
}
/**
...
...
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