Revert "Security permissions fix & functional test"

This reverts commit a959c4a1a1a7783eddb2ebe46c2c8ad56938a368.