Add permission manager

This fix settings crash