Added backwards compatible way to do sanity checking on permissions and raise exceptions when you make a typo.

Yes, but this way you can NOT do the checking by not providing it.

We could get them from the roles but we'll start raising exceptions while
before we didn't.

On 26 November 2014 at 13:57, Anatoly Bubenkov <notifications@github.com>
wrote:

> In balrog/policy.py:
>
> >
> >
> >  class Policy(object):
> >
> >      """Controls the access of a certain actor to a certain action on a resource."""
> >
> > -    def __init__(self, roles, get_identity, get_role):
> > +    def __init__(self, roles, get_identity, get_role, permissions=None):
>
> policy is able to get all possible permissions by itself
> there's no need to receive it as a parameter
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/paylogic/balrog/pull/1/files#r20933058>.
>