work in progress on advanced permission handling