protected void writeContent()

in src/main/java/org/apache/sling/jackrabbit/usermanager/impl/post/AbstractAuthorizablePostServlet.java [522:554]


    protected void writeContent(Session session, Authorizable authorizable,
            Collection<RequestProperty> reqProperties,
            List<Modification> changes) throws RepositoryException {

        for (RequestProperty prop : reqProperties) {
            if (prop.hasValues()) {
                // remove artificial "/" prepended to the prop path
                String relativePath = prop.getPath().substring(1);
                
                // skip jcr special properties
                String name = prop.getName();
                boolean isSpecialProp = name.equals(JcrConstants.JCR_PRIMARYTYPE)
                    || name.equals(JcrConstants.JCR_MIXINTYPES);
                if (authorizable.isGroup()) {
                    if (relativePath.equals("groupId")) {
                        // skip these
                        isSpecialProp = true;
                    }
                } else {
                    if (relativePath.equals("userId")
                        || relativePath.equals("pwd")
                        || relativePath.equals("pwdConfirm")) {
                        // skip these
                        isSpecialProp = true;
                    }
                }
                if (!isSpecialProp &&  // skip these
                        !prop.isFileUpload()) { // don't handle files for user properties for now.
                    setPropertyAsIs(session, authorizable, prop, changes);
                }
            }
        }
    }