A JS port of some of the features from the authorization library CanCan