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

policy is able to get all possible permissions by itself
there's no need to receive it as a parameter