You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current deadbolt scala api feels very java-like. however it should be trivially easy to add a lightweight scala dsl for permission building to create a better api.
Instead of:
// subject must have the "foo" AND "bar" roles defrestrictedFunctionB= actionBuilder.RestrictAction("foo", "bar").defaultHandler() { Ok(accessOk()) }
// subject must have the "foo" OR "bar" roles defrestrictedFunctionC= actionBuilder.RestrictAction(List(Array("foo"), Array("bar"))).defaultHandler() { Ok(accessOk()) }
The API could look like this (even without changing the current api, by adding some dsl builders:
// Foo and Bar are types / enums / case classes ... or just stay string, both would work// subject must have the "foo" AND "bar" roles defrestrictedFunctionB=RestrictAction(Foo and Bar) { Ok(accessOk()) }
// subject must have the "foo" OR "bar" roles defrestrictedFunctionC=RestrictAction(Foo or Bar) { Ok(accessOk()) }
The text was updated successfully, but these errors were encountered:
The current deadbolt scala api feels very java-like. however it should be trivially easy to add a lightweight scala dsl for permission building to create a better api.
Instead of:
The API could look like this (even without changing the current api, by adding some dsl builders:
The text was updated successfully, but these errors were encountered: