Revert "remove permissions management"

This reverts commit 447ed32ac4e59652f9737b51169cc80065df5645.