[BZ1051260] check permission for public static methods
(cherry picked from commit 457e084)
Merge pull request #438 from pskopek/master-BZ1051260

[BZ1051260] check permission for public static methods