0

Deadbolt's documentation is sparse, really.

Let's say that I have a standard User. The User object I use has a method - "getThing"

I want a role that applies for a "getThing" value of more than 50.

How would I go about doing this? Is this possible, or am I misunderstanding deadbolt?

halfer
  • 19,824
  • 17
  • 99
  • 186
bharal
  • 15,461
  • 36
  • 117
  • 195

1 Answers1

0

Roles represent static constraints, e.g. the subject has role x and access to a resource requires the subject to have role y.

For your requirements, you need to use a dynamic constraint. This is some arbitrary rule defined by you that must be satisfied to allow access to a resource.

You can read about the different constraints in the documentation, including dynamic constraints.

Steve Chaloner
  • 8,162
  • 1
  • 22
  • 38