Revert "remove permissions management"

This reverts commit 7e4fba1da1223a704a0a0af49bbf50038845aae6.