SONAR-4535 Apply permission template based on pattern