[xwiki-devs] [VOTE] Add 6 new methods to com.xpn.xwiki.api for loading and saving documents as the content author of the script calling the method.
Hello all, I'd like to make this change: Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor() Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName) They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation. Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing. This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted. This is my +1 Caleb
Here is a patch which adds those methods http://jira.xwiki.org/jira/secure/attachment/16923/XWIKI-5041-allowDocumentM... And the issue: http://jira.xwiki.org/jira/browse/XWIKI-5041 Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
When this was a proposal I got +1 from Sergiu so I understand that is a vote. 2 +1 1 +0 0 -1 I'm going to go ahead and commit this now. Caleb Caleb James DeLisle wrote:
Here is a patch which adds those methods http://jira.xwiki.org/jira/secure/attachment/16923/XWIKI-5041-allowDocumentM... And the issue: http://jira.xwiki.org/jira/browse/XWIKI-5041
Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
I was informed that this vote needs 3 +1 to be valid so although the change is committed anyone who does not like this change please send a -1 before Thursday and I will remove the change pending further discussion. Caleb Caleb James DeLisle wrote:
When this was a proposal I got +1 from Sergiu so I understand that is a vote. 2 +1 1 +0 0 -1
I'm going to go ahead and commit this now.
Caleb
Caleb James DeLisle wrote:
Here is a patch which adds those methods http://jira.xwiki.org/jira/secure/attachment/16923/XWIKI-5041-allowDocumentM... And the issue: http://jira.xwiki.org/jira/browse/XWIKI-5041
Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+1 (for formal validation only - though that maybe infringes on my "don't vote on stuff I don't get" rule). Please hold on Caleb's withdrawal offer if needed. Guillaume On Tue, Mar 30, 2010 at 12:10 AM, Caleb James DeLisle < [email protected]> wrote:
I was informed that this vote needs 3 +1 to be valid so although the change is committed anyone who does not like this change please send a -1 before Thursday and I will remove the change pending further discussion.
Caleb
Caleb James DeLisle wrote:
When this was a proposal I got +1 from Sergiu so I understand that is a vote. 2 +1 1 +0 0 -1
I'm going to go ahead and commit this now.
Caleb
Caleb James DeLisle wrote:
Here is a patch which adds those methods
http://jira.xwiki.org/jira/secure/attachment/16923/XWIKI-5041-allowDocumentM...
And the issue: http://jira.xwiki.org/jira/browse/XWIKI-5041
Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
And, well, at least I know (or maybe I only think I know?) that this impacts Caleb's ability to deliver the new invitation application thus it's (hopefully) not like I don't know anything about it... Fingers crossed. Guillaume On Tue, Mar 30, 2010 at 12:45 AM, Guillaume Lerouge <[email protected]>wrote:
+1 (for formal validation only - though that maybe infringes on my "don't vote on stuff I don't get" rule).
Please hold on Caleb's withdrawal offer if needed.
Guillaume
On Tue, Mar 30, 2010 at 12:10 AM, Caleb James DeLisle < [email protected]> wrote:
I was informed that this vote needs 3 +1 to be valid so although the change is committed anyone who does not like this change please send a -1 before Thursday and I will remove the change pending further discussion.
Caleb
Caleb James DeLisle wrote:
When this was a proposal I got +1 from Sergiu so I understand that is a vote. 2 +1 1 +0 0 -1
I'm going to go ahead and commit this now.
Caleb
Caleb James DeLisle wrote:
Here is a patch which adds those methods
http://jira.xwiki.org/jira/secure/attachment/16923/XWIKI-5041-allowDocumentM...
And the issue: http://jira.xwiki.org/jira/browse/XWIKI-5041
Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
-- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
+0 Thanks, Marius Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Caleb, On 03/25/2010 02:11 PM, Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
except for the fact that I'm not very fond of adding new API to what we should refactor to clean & fix, I'm fine with this API. Here's my +0. Happy hacking, Anca
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Mar 25, 2010, at 1:11 PM, Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
Responding a bit late on this. I'd have preferred AsContentAuthor for the name. Actually AsAuthor is misleading since you're expecting an author to be passed as a parameter. SaveWithCurrentContentAuthor would have been better IMO. What is the underlying use case? Is it for the cases when someone edits a page but makes no changes? (for this case I think we shouldn't save the doc and create a revision). If I add objects or attachments then the doc will be saved as the last author. That doesn't look right to me. The notification will be sent with the previous author's name, no? (I haven't checked your patch or the existing code though so I may be wrong). Thanks -Vincent
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
Vincent Massol wrote:
On Mar 25, 2010, at 1:11 PM, Caleb James DeLisle wrote:
Hello all, I'd like to make this change:
Add to xwiki.api.Document saveAsAuthor() saveAsAuthor(String comment) saveAsAuthor(String connent, String isMinorEdit) deleteAsAuthor()
Add to xwiki.api.XWiki getDocumentAsAuthor(DocumentReference reference) getDocumentAsAuthor(String fullName)
They save, load or delete the document if the script's contentAuthor has the necessary permission, the user in context is switched so the contentAuthor is listed as having done the operation.
Though they say *AsAuthor the action will take place in the name of the contentAuthor of the document this is mainly because *AsContentAuthor is long and confusing.
Responding a bit late on this.
I'd have preferred AsContentAuthor for the name. Actually AsAuthor is misleading since you're expecting an author to be passed as a parameter. You mean I'm not expecting an author parameter? there are no parameters except for the getDocumentAsAuthor methods which need the document name/reference.
SaveWithCurrentContentAuthor would have been better IMO. "would have" I can still change it if you feel strongly about this but getDocumentWithCurrentContentAuthor is a lot to type and it implies that we are getting a document which has a given content author.
What is the underlying use case? Is it for the cases when someone edits a page but makes no changes? (for this case I think we shouldn't save the doc and create a revision).
Suppose you wanted to make a script which let people sign up to a mailing list by submitting their email address. Your script must save the email to an object in a document somewhere but can't let the viewer actually edit or even view the document thus reading the email addresses of other previously signed up users.
If I add objects or attachments then the doc will be saved as the last author. That doesn't look right to me. The notification will be sent with the previous author's name, no? (I haven't checked your patch or the existing code though so I may be wrong).
You (the viewer) should never be able to use these functions, they are only for the script author of document x to be able to use their script to save document y based on input from a user who may not save document y. Caleb
Thanks -Vincent
This is already partially available if the script has programming access but I think it is an important enough feature that it should not be limited to scripts with programming access. Use case: allowing users to submit information without letting them see or modify what other users had submitted.
This is my +1
Caleb
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (5)
-
Anca Luca -
Caleb James DeLisle -
Guillaume Lerouge -
Marius Dumitru Florea -
Vincent Massol