public static List<PolicySummaryBean> hideSensitiveDataFromPolicySummaryBeanList(ISecurityContext securityContext, List<PolicySummaryBean> policySummaryBeans) {
        List<PolicySummaryBean> policies = new ArrayList<>();
        for (PolicySummaryBean policySummaryBean : policySummaryBeans) {
            PolicySummaryBean policySummary = new PolicySummaryBean();
            policySummary.setId(policySummaryBean.getId());
            policySummary.setPolicyDefinitionId(policySummaryBean.getPolicyDefinitionId());
            policySummary.setName(policySummaryBean.getName());
            policySummary.setDescription(policySummaryBean.getDescription());
            policySummary.setIcon(policySummaryBean.getIcon());
            // check if the role was created by the current user
            if (securityContext.getCurrentUser().equals(policySummaryBean.getCreatedBy())) {
                policySummary.setCreatedBy(policySummaryBean.getCreatedBy());
                policySummary.setCreatedOn(policySummaryBean.getCreatedOn());
            }
            policies.add(policySummary);
        }
        return policies;
    }
This method will hide sensitive data, such as created by, from the result

@param securityContext    the security context
@param policySummaryBeans the summary beans
@return A list with beans without sensitive data
manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/util/RestHelper.java