-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(rbac): conditional access form validation #1699
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,9 @@ export const CustomArrayField = (props: FieldProps) => { | |
label={name} | ||
value={fieldVal} | ||
onChange={e => { | ||
setFieldVal(e.target.value); | ||
onChange(e.target.value.split(',').map(val => val.trim())); | ||
const value = e.target.value; | ||
setFieldVal(value); | ||
onChange(value ? value.split(',').map(val => val.trim()) : []); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it returns an empty array, the item account will be 0 which doesn't meet the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @AndrienkoAleksandr I am able to add below condition on catalog-entity :
On applying above the corresponding role members cannot access any type of catalog-entity kinds. Does this look correct to you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can deny such conditions with help of validator in the frame of the https://issues.redhat.com/browse/RHIDP-2157 . But maybe it can be feature... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But here https://docs.google.com/document/d/1XMEmSlwVog1cOD0X5ADwg53Vnm8PL-HH_8LZriUM7vs/edit?disco=AAABNnL7BR8 kinds is just required which mean kinds cannot be undefined but it can be [] as it doesnt have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I believe we are not responsible for such arrays. The plugin author designs and controls this aspect. |
||
}} | ||
className={classes.bgPaper} | ||
required={required} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ciiay this actually depends on the plugin devs/maintainer as what condition rules they add to their plugins resource-types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove the comment.