Authorization

Added hook methods to authorize actions over instances and restrict the DB segment exposed via `query`