Skip to content
Snippets Groups Projects
Commit 0ba66b38 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

up

parent 543beea1
No related branches found
No related tags found
2 merge requests!111Release 0.12.1,!109F select acl
...@@ -27,8 +27,10 @@ package org.caosdb.server.database.backend.transaction; ...@@ -27,8 +27,10 @@ package org.caosdb.server.database.backend.transaction;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import org.apache.shiro.subject.Subject; import org.apache.shiro.subject.Subject;
import org.caosdb.server.database.BackendTransaction; import org.caosdb.server.database.BackendTransaction;
import org.caosdb.server.database.exceptions.EntityDoesNotExistException; import org.caosdb.server.database.exceptions.EntityDoesNotExistException;
import org.caosdb.server.accessControl.Principal;
import org.caosdb.server.datatype.CollectionValue; import org.caosdb.server.datatype.CollectionValue;
import org.caosdb.server.datatype.IndexedSingleValue; import org.caosdb.server.datatype.IndexedSingleValue;
import org.caosdb.server.datatype.ReferenceValue; import org.caosdb.server.datatype.ReferenceValue;
...@@ -234,7 +236,7 @@ public class RetrieveFullEntityTransaction extends BackendTransaction { ...@@ -234,7 +236,7 @@ public class RetrieveFullEntityTransaction extends BackendTransaction {
final RetrieveEntity ref = new RetrieveEntity(value.getId()); final RetrieveEntity ref = new RetrieveEntity(value.getId());
if (this.subject != null) { if (this.subject != null) {
System.out.println(this.subject.getUsername()) System.out.println(((Principal) this.subject.getPrincipal()).getUsername());
// check whether the referenced entity may be retrieved // check whether the referenced entity may be retrieved
final EntityACL entityACL = ref.getEntityACL(); final EntityACL entityACL = ref.getEntityACL();
if (!entityACL.isPermitted(this.subject, EntityPermission.RETRIEVE_ENTITY)) { if (!entityACL.isPermitted(this.subject, EntityPermission.RETRIEVE_ENTITY)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment