Refactoring get_permissios()