/** * Get fullName of the profile document of the author of the last content modification in the document. Example: * XWiki.Admin. * * @return The fullName of the profile document of the author of the last content modification in the document. */ public String getContentAuthor() { return this.doc.getContentAuthor(); }
String user = currentDoc.getContentAuthor(); DocumentReference userReference = currentDoc.getContentAuthorReference();
/** * {@inheritDoc} * * @see com.xpn.xwiki.doc.XWikiDocument#getContentAuthor() */ @Override public String getContentAuthor() { return getDocument().getContentAuthor(); }
/** * Get the name of the content author of the current document for security checking. * If {@link Context#dropPermissions()} has been called then this will return the guest user no matter * who the real author is. * If there is no current document then the guest user is returned because there is no reason for script to * have any permission if does not exist in any document. * * @return the name of the document author or guest. */ String getEffectiveScriptAuthorName() { if (!this.getXWikiContext().hasDroppedPermissions()) { final XWikiDocument doc = this.getXWikiContext().getDoc(); if (doc != null) { return doc.getContentAuthor(); } } return XWikiRightService.GUEST_USER; } }
String username = doc.getContentAuthor();
if (!getContentAuthor().equals(doc.getContentAuthor())) { return false;
revisionParameters.put(WikiDocumentFilter.PARAMETER_REVISION_MINOR, document.isMinorEdit()); revisionParameters.put(WikiDocumentFilter.PARAMETER_CONTENT_AUTHOR, document.getContentAuthor()); revisionParameters.put(WikiDocumentFilter.PARAMETER_CONTENT_DATE, document.getContentUpdateDate()); revisionParameters.put(WikiDocumentFilter.PARAMETER_CONTENT, document.getContent());
doc.setCreator(xdoc.getCreator()); doc.setAuthor(xdoc.getAuthor()); doc.setContentAuthor(xdoc.getContentAuthor()); doc.setCustomClass(xdoc.getCustomClass()); doc.setVersion(xdoc.getVersion());
el.addText(getContentAuthor()); wr.write(el);
setDocumentArchive(document.getDocumentArchive()); setAuthor(document.getAuthor()); setContentAuthor(document.getContentAuthor()); setContent(document.getContent()); setContentDirty(document.isContentDirty());