Map<String, Object> roleMap = roles.get(roleId);
if(roleMap == null) {
Role role = roleAPI.loadRoleById(roleId);
if(role == null)
return;
roleMap = role.toMap();
roles.put(role.getId(), roleMap);
if(!inheritable) {
if(p.getInode().equals(perm.getPermissionId())) {
roleMap.put("inherited", false);
} else {