Entity XPath failing - Security

0
I've added Xpath constraint on accounts entity so a person can only edit account which belong to them simple: [id='[%CurrentUser%]'] However I get this error whenever I open MyAccount form: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"id":"[MendixIdentifier:: id=8162774324609125 objectType=Administration.Account entityID=29]","type":"RetrieveIdAction"}', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:216) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"id":"[MendixIdentifier:: id=8162774324609125 objectType=Administration.Account entityID=29]","type":"RetrieveIdAction"}', all database changes executed by this action were rolled back at com.mendix.core.actionmanagement.CoreAction.processErrorState(SourceFile:342) Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s): de: Object types: [Administration.Account] at com.mendix.m.a(SourceFile:58) Caused by: com.mendix.core.CoreRuntimeException: 'System.owner' is not a persistable association at com.mendix.h.a(SourceFile:28) at com.mendix.g.b(SourceFile) at com.mendix.cx.a(SourceFile:596) at com.mendix.cx.a(SourceFile:485) at com.mendix.cx.a(SourceFile:85) at com.mendix.co.a(SourceFile:95) at com.mendix.cs.a(SourceFile:71) at com.mendix.m.a(SourceFile:44) at com.mendix.a.a(SourceFile:265) at com.mendix.core.action.user.Retriever$class.retrieveFromDatabase(SourceFile:34) at com.mendix.core.action.user.RetrieveIdAction.retrieveFromDatabase(SourceFile:19) at com.mendix.core.action.user.RetrieveIdAction.retrieveFromDatabase(SourceFile:40) at com.mendix.core.action.user.RetrieveIdAction.executeAction(SourceFile:34) at com.mendix.core.action.user.RetrieveIdAction.executeAction(SourceFile:19) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:53) at com.mendix.core.actionmanagement.CoreAction.doCall(SourceFile:291) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:276) at com.mendix.core.actionmanagement.ActionManager.executeSync(SourceFile:205) at com.mendix.core.component.InternalCore.retrieveId(SourceFile:1207) at com.mendix.jc.a(SourceFile:42) at com.mendix.pa$g.apply$mcV$sp(SourceFile:292) at com.mendix.pa$g.apply(SourceFile:283) at com.mendix.pa$g.apply(SourceFile:283) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(SourceFile:148) at scala.util.Try$.apply(Try.scala:161) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(SourceFile:146) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)" But when I remove the contraint, then the error doesn't occur. Your assistance will be highly appreciated.
asked
1 answers
0

Solution:

  1. Duplicated the access rule,
  2. Removed the xpath constraints,
  3. Changed the access rights to full read, no write.

Its now working perfect as required. Note: I maintained both the original and the new access rules.

answered