added copy options rules feature
related to #7767
Will the Duplicate option be valid for all such dialogs? Might be better to have an allowDuplication option (as per allowModification) with the default as false. That way we can enable it per dialog and then double check it works. We dont really have any UI unit tests so we'd need to manually test these anyway...
So will have to update AbstractMultipleOptionsBaseTablePanel( AbstractMultipleOptionsBaseTableModel<E> model, boolean allowModification) by adding another parameter of allowduplicate right? This currently has 3 usages, so do you mean that I should pass false from all 3 instances?
Any idea how to resolve the build issue? I have tried to clean and build the project but the issue persists.
You need to keep binary compatibility, e.g. add a new constructor instead of changing that one.
Will the Duplicate option be valid for all such dialogs? Might be better to have an allowDuplication option (as per allowModification) with the default as false. That way we can enable it per dialog and then double check it works. We dont really have any UI unit tests so we'd need to manually test these anyway...
I have added the allowDuplication option and passed the same value as that of allowModification at all instances
You need to keep binary compatibility, e.g. add a new constructor instead of changing that one.
I am trying to add something like protected AbstractMultipleOptionsBaseTablePanel(boolean allowDuplicate). From where should I invoke this constructor? I cannot use the this(false) from public AbstractMultipleOptionsBaseTablePanel(AbstractMultipleOptionsBaseTableModel<E> model) or protected AbstractMultipleOptionsBaseTablePanel(AbstractMultipleOptionsBaseTableModel<E> model, boolean allowModification) as they already use this and super respectively.
One more query, can't we use the allowModification flag for duplicate functionality? So duplicate will only be available when modify is present. Or is it necessary to have them independent of each other?
They should be independent. There may be situations where modifying one is fine but duplicating isn’t and vice versa.
https://github.com/zaproxy/zaproxy/pull/7783#issuecomment-1483781358
You can change the implementation of the existing constructors just not their signature.
You can change the implementation of the existing constructors just not their signature.
Is the current approach fine?
See https://github.com/zaproxy/zaproxy/pull/7783#discussion_r1148520421
Could anyone please review the changes? Are anymore changes required?
I'd be happy to finish this, any further feedback?
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.
I have read the CLA Document and I hereby sign the CLA
Posted by the CLA Assistant Lite bot.
Checkmarx One – Scan Summary & Details – 07d4f7f0-065d-4148-971c-2d68cfa25e88
Great job, no security vulnerabilities found in this Pull Request
Closing the dialogue window should cancel the Duplicate operation, and the new entry should not appear, right?
That seems logical to me.