Throw exception on invalid permissions.