WIP: first changes for new permission structure