jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Security UI improvements

Open glebfox opened this issue 3 years ago • 1 comments

  1. Custom filer should use flowBox for filter fields, so they are displayed on the next line if nit enough space Screenshot 2022-08-24 at 11 35 49

  2. Not all columns values have localization, e.g. Type, Action, Source Screenshot 2022-08-22 at 11 38 28 Screenshot 2022-08-22 at 11 38 14

  3. (Code) Create Entity resource policy - actions must be presented with CheckBoxGroup instead of separate CheckBoxes Screenshot 2022-08-24 at 11 41 01

  4. All Create policy screens have to check unsaved changes. Currently only Specific Policy and GraphQL Policy do that.

  5. GraphQL Policy is edited (not created) with the DefaultPolicyEditor instead of its own

  6. Row-level policy - Dialog buttons must be aligned to the left as all dialog buttons do. Documentation link can be aligned to the right. Also it's worth implementing docs link using the Link component instead of LinkButton with programmatic page opening Screenshot 2022-08-24 at 11 47 58

  7. Action field for Predicate Policy for Annotated Class Row Level Role is editable and can produce unsaved changes

Screenshot 2022-08-30 at 13 32 58

glebfox avatar Aug 24 '22 07:08 glebfox

We should do all items except 2 (Not all columns values have localization, e.g. Type, Action, Source)

gorbunkov avatar Oct 18 '22 13:10 gorbunkov

Wait for NPE fix :

aused by: java.lang.NullPointerException: null
	at io.jmix.securityui.screen.resourcepolicy.EntityResourcePolicyModelCreate.getPolicyActions(EntityResourcePolicyModelCreate.java:91) ~[jmix-security-ui-1.5.999-SNAPSHOT.jar:na]
	at io.jmix.securityui.screen.resourcepolicy.EntityResourcePolicyModelCreate.validateScreen(EntityResourcePolicyModelCreate.java:128) ~[jmix-security-ui-1.5.999-SNAPSHOT.jar:na]

Steps to reproduce:

  1. Resource Role ->create new one -> create Entity Policy
  2. Click OK without selecting anything

Flaurite avatar Nov 11 '22 10:11 Flaurite

Reopened TC:

  • Open Resource role Create Resource policies:
  1. Create - Menu policy - Set Resource - After select null string resource AR: NullPointerException: Cannot invoke "String.equals(Object)" because "id" is null
 java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "id" is null
at io.jmix.ui.menu.MenuConfig.findItem(MenuConfig.java:563)
at io.jmix.securityui.model.DefaultResourcePolicyGroupResolver.resolvePolicyGroupForMenuPolicy(DefaultResourcePolicyGroupResolver.java:174)
at io.jmix.securityui.model.DefaultResourcePolicyGroupResolver.resolvePolicyGroup(DefaultResourcePolicyGroupResolver.java:120)
...
  1. Create - Screen policy - Set Resource - After select null string resource AR: NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
	at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
	at java.base/java.util.regex.Matcher.reset(Matcher.java:415)
	at java.base/java.util.regex.Matcher.<init>(Matcher.java:252)
	at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134)
...

rusiaikinat avatar Nov 14 '22 10:11 rusiaikinat