# Working with RBAC

## Permission priority

When a request is made, the RBAC service decides whether a given request should be allowed or denied. The evaluation logic follows these rules:

* By default, all requests are denied (*Note: when you creating a new user on Mobingi ALM, by default, this user has no permissions* )
* An explicit allow overrides this default
* Deny pattern always overrides allow pattern against same resources
* An explicit deny overrides any allows

  The order in which the policies are evaluated has no effect on the outcome of the evaluation. All policies are evaluated, and the result is always that the request is either allowed or denied.

## Apply order

* Allow pattern always applies first.
* Deny pattern overrides allows.
* Additionally, when the action performing user belongs to a *Team* and both its user role and team role are attached, the *Team* role will overwrite the user role.
