guardian / typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Apache License 2.0
276 stars 12 forks source link

Add edit permissions #118

Closed jonathonherbert closed 3 years ago

jonathonherbert commented 3 years ago

What does this change?

Adds edit permissions to a temporary endpoint, /editPermissionCheck, via our permissions service. Production use will depend on an open PR in that service. (edit: this is now merged.)

How to test

Locally, hit the /editPermissionCheck endpoint whilst running the rule manager service (sbt ruleManager / run). You should be denied permission.

Add CODE permissions for the manage_rules permission, and wait a few minutes for them to be published and for your local perm cache to clear (or restart the app!). You should be granted permission.

How can we measure success?

We can use permissions as we please in the project.

Dev notes

I've used a config DTO as per e.g. Grid to easily pass along configuration settings without increasing the arity of common class constructors – I hope this pattern makes sense!