Skip to content

Conversation

@adamegyed
Copy link
Contributor

@adamegyed adamegyed commented Jul 18, 2024

Motivation

As noted in #103, since the introduction of installValidation, there have been two pathways of installing validation functions: by specifying them in installValidation, or by having a plugin specifying them in the manifest and calling installPlugin.

Given the context that most uses of validation-in-manifest installs was for direct call authorization, and the context that adding pre-validation hooks + permission hooks to the manifest based install is not very direct, this PR explores an option of removing validation installation from the manifest completely.

Solution

Remove validation functions from the manifest.

Update any usages of direct call validation specified in the manifest to an initialization of the direct call permission via installValidation.

Future Work

If we decide to go this route, we should define a place in the plugin metadata to indicate a request for direct call permissions.

@adamegyed adamegyed changed the title [draft] feat: [v0.8-develop] Remove validation installation from the manifest [draft] feat: [v0.8-develop] Remove validation installation from the manifest 3/N Option 2 Jul 18, 2024
@adamegyed adamegyed force-pushed the adam/merge-plugin-manager branch from 220497a to 2a5de9d Compare July 19, 2024 18:38
@adamegyed adamegyed force-pushed the adam/manifest-remove-validation branch from 4efbaef to 610a6fc Compare July 19, 2024 18:50
@adamegyed adamegyed changed the title [draft] feat: [v0.8-develop] Remove validation installation from the manifest 3/N Option 2 feat: [v0.8-develop] Remove validation installation from the manifest 3/N Jul 22, 2024
@adamegyed adamegyed marked this pull request as ready for review July 22, 2024 16:11
@adamegyed adamegyed requested a review from a team July 22, 2024 16:11
_setExecutionFunction(selector, isPublic, allowGlobalValidation, module);
}

length = manifest.validationFunctions.length;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we get rid of preValidationHooks installation in installModule in a previous PR? Don't see them in code anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did, I think in the PR that introduced installValidation. Previously, preValidationHooks were associated with selectors, which also associated them to validations because there was a 1:1 mapping between selectors and validation. But when we allowed multiple validation functions, we needed a way to associate the preValidationHooks, so they became installValidation only.

@adamegyed adamegyed force-pushed the adam/merge-plugin-manager branch from 2a5de9d to 1ba0233 Compare July 23, 2024 16:59
Base automatically changed from adam/merge-plugin-manager to v0.8-develop July 23, 2024 17:04
@adamegyed adamegyed force-pushed the adam/manifest-remove-validation branch from 04132e0 to 22f26cf Compare July 23, 2024 17:06
@adamegyed adamegyed merged commit 4f8947d into v0.8-develop Jul 23, 2024
@adamegyed adamegyed deleted the adam/manifest-remove-validation branch July 23, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants