refactor permissions table map