You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
launch attached project (there is one row-level role "restrict-users" defined in code) comb.zip
create new row-level role "combined", add "restrict-users" as child role
save new role
reopen combined role for editing
you will see that Predicate from the child role has been copied to the "row-level policies" table. With empty join and where clauses.
if you press OK, invalid predicate will be saved to the database.
after that you can create user "alex", with (resource roles = Full Access, row-level roles = combined). Relogin, open Users screen and choose some user.
you will get an exception:
java.lang.NullPointerException
at io.jmix.securitydata.impl.role.provider.DatabaseRowLevelRoleProvider.lambda$createPredicateFromScript$1(DatabaseRowLevelRoleProvider.java:109)
at java.base/java.util.function.Predicate.lambda$and$0(Predicate.java:69)
at java.base/java.util.function.Predicate.lambda$and$0(Predicate.java:69)
at io.jmix.core.accesscontext.InMemoryCrudEntityContext.isUpdatePermitted(InMemoryCrudEntityContext.java:75)
at io.jmix.ui.action.list.EditAction.refreshState(EditAction.java:291)
at io.jmix.ui.component.impl.AbstractTable.refreshActionsState(AbstractTable.java:1311)
at io.jmix.ui.component.impl.AbstractTable.tableSourceSelectedItemChanged(AbstractTable.java:1759)
at io.jmix.ui.component.table.TableDataContainer.datasourceSelectedItemChanged(TableDataContainer.java:322)
at io.jmix.core.common.event.EventHub.publish(EventHub.java:170)
at io.jmix.ui.component.data.table.ContainerTableItems.containerItemChanged(ContainerTableItems.java:70)
at io.jmix.core.common.event.EventHub.publish(EventHub.java:170)
at io.jmix.ui.model.impl.InstanceContainerImpl.fireItemChanged(InstanceContainerImpl.java:167)
at io.jmix.ui.model.impl.CollectionContainerImpl.setItem(CollectionContainerImpl.java:75)
at io.jmix.ui.component.data.table.ContainerTableItems.setSelectedItem(ContainerTableItems.java:153)
at io.jmix.ui.component.impl.AbstractTable.tableSelectionChanged(AbstractTable.java:1196)
at jdk.internal.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
...
Because predicates with empty text have been saved to the database.
The text was updated successfully, but these errors were encountered:
Jmix: 1.0.2
launch attached project (there is one row-level role "restrict-users" defined in code)
comb.zip
create new row-level role "combined", add "restrict-users" as child role
save new role
reopen combined role for editing
you will see that Predicate from the child role has been copied to the "row-level policies" table. With empty join and where clauses.
if you press OK, invalid predicate will be saved to the database.
after that you can create user "alex", with (resource roles = Full Access, row-level roles = combined). Relogin, open Users screen and choose some user.
you will get an exception:
Because predicates with empty text have been saved to the database.
The text was updated successfully, but these errors were encountered: