add base permission class and tests