code: public static CmsPermissionBean getBeanForPrincipal(Set<CmsPermissionBean> beans, String principalName) {
  
          for (CmsPermissionBean bean : beans) {
              if (bean.getPrincipalName().equals(principalName)) {
                  return bean;
              }
          }
          return null;
      }
docs: Gets the bean for principal from list of beans.<p>
  
  @param beans to look principal up
  @param principalName name of principal to get bean of
  @return CmsPermissionBean