Created getAllowedActions function