Hello Isomorphic,
I'm getting an error in my application telling me that the logged in user does not have a specific role, which is true (uses does not have one of the roles). (PLEASE SEE MY OWN REPLY, preconditions changed)
But this request (to be piggybacked in addRelatedUpdate() later on) was started on the server, not the client. This worked fine in 4.1p from 2015-03-25. Are there any changes in 5.1d 2015-03-25 (bugfix or intentional) that could lead to failure of a server started DSRequest?
Error log:
QUERY_VIEW.java line 40 is: DSResponse fetchResponse = fetchRequest.execute();
Lines before are:
The RPCManager used is the one from the client request, but until now, this worked fine.
Do you have an idea what is happening here?
Thank you & Best regards,
Blama
I'm getting an error in my application telling me that the logged in user does not have a specific role, which is true (uses does not have one of the roles). (PLEASE SEE MY OWN REPLY, preconditions changed)
But this request (to be piggybacked in addRelatedUpdate() later on) was started on the server, not the client. This worked fine in 4.1p from 2015-03-25. Are there any changes in 5.1d 2015-03-25 (bugfix or intentional) that could lead to failure of a server started DSRequest?
Error log:
Code:
=== 2015-03-27 19:40:01,316 [ec-6] WARN RequestContext - dsRequest.execute() failed: java.lang.SecurityException: DataSource 'xxx', operationType 'fetch', operationId 'null'. This operation requires role(s) 'a, b, c'. User '1310'fails the role check. at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2428) at com.lmscompany.lms.server.worker.QUERY_VIEW.queryDS(QUERY_VIEW.java:40) ... ...
Lines before are:
Code:
public class QUERY_VIEW { @SuppressWarnings("unchecked") static DSResponse queryDS(RPCManager rpcManager, DatasourceEnum dataSource, String operationId, String afterOperationType, final Object criteriaFieldValueOrValueList) throws Exception { ArrayList<Long> valueList = null; Long valueSingle = null; final DSRequest fetchRequest = new DSRequest(dataSource.getValue(), DataSource.OP_FETCH, rpcManager); if (operationId != null) fetchRequest.setOperationId(operationId); if (criteriaFieldValueOrValueList instanceof ArrayList) { valueList = (ArrayList<Long>) criteriaFieldValueOrValueList; fetchRequest.setAdvancedCriteria(new AdvancedCriteria(DefaultOperators.And.getID(), new Criterion[] { new SetCriterion(fetchRequest .getDataSource().getPrimaryKey(), DefaultOperators.InSet.getID(), valueList) })); } else if (criteriaFieldValueOrValueList instanceof Long) { valueSingle = (Long) criteriaFieldValueOrValueList; fetchRequest.setCriteria(fetchRequest.getDataSource().getPrimaryKey(), valueSingle); valueList = new ArrayList<Long>(); valueList.add(valueSingle); } DSResponse fetchResponse = fetchRequest.execute();
Do you have an idea what is happening here?
Thank you & Best regards,
Blama
Comment