hide not allowed actions. refactoring