List of allowed groups and small refactoring

Added &allowedGroups option.
Small refactoring for if condition.

Bumped version to 3.6.0-pl