Re: [xwiki-users] Approval process for user edits?
Hi John, Since we program such functionalities in Java components and not in scripts I cant give you details on how to do it in Groovy, but I hope I can explain Guillaume's idea of the script. I think his idea was the following: Register a listener to the save action. Doing this, your script / method will always be called when a document gets saved. When that happens you check for the saved document the field on your ApprovalStatusClass and change the view rights on the document accordingly if a change happened. So, if the reviewer checked a document and changes the status to approved you change the view rights of this document. I hope this clarifies Guillaume's idea a bit ... and I understood the idea correctly ;-) Edo On Wed, Aug 3, 2011 at 9:20 PM, Campbell, John john.campb...@viasat.com wrote: Hi Guillaume, I understand some of the concepts to which you're referring, but I'm more of a writer/content guy, so my understanding of the code/scripting is very limited. I'll try to follow along. I've created a class called ApprovalStatus and made it a static list with the following values: in review|approved|rejected. I created the ApprovalStatusClass Sheet and ApprovalStatusClass Template, as well. Here are some things I would like to be able to do with this class. Can you tell me if these are feasible? 1. Attach the class to the process document template I have already created that users will use when they create new pages. 2. Have the class default to the in review value. 3. Make this element invisible to the Users group, but visible and editable to the Supervisors group (for example, a Supervisor would be able to review a page that is in review, and then if it is acceptable, change the status to approved). I'm not sure I completely follow what you're talking about with the script section of your comment. But I would love to learn more. Can you elaborate a bit more, please? Thanks, John -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume Lerouge Sent: Wednesday, August 03, 2011 2:55 AM To: XWiki Users Subject: Re: [xwiki-users] Approval process for user edits? Hi John, - Create a process class with a validation status (under review, validated...) [1] - Create a groovy script that listens for changes of the value of the status property and updates a XWikiRights object attached to the page based on the value of the validation status property [2] - - when the status changes, the script will apply appropriate rights to the page - - you can list only validated on the homepage of one of your Hope this helps, Guillaume [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+Using+Groovy On Tue, Aug 2, 2011 at 8:07 PM, Dale Amon a...@vnl.com wrote: On Tue, Aug 02, 2011 at 05:45:09PM +, Campbell, John wrote: Hello again, XWiki community. I am working on using XWiki to be the repository for a library of process documents that will be added to and updated on a constant basis by members of our team. It looks like it's going to be a great resource for us. However, I do have a question that involves rights and permissions. Our manager wants to incorporate an approval process in the process document wiki. She wants users to be able to edit existing process documents and create new process documents, but for those documents to go through a technical/style review by supervisors before they are published for use by the team. I don't see a way to manage permissions/rights to make that idea work for the wiki as a whole, though I can see a workaround for new process documents (force them to be created in a Review space). Is there a way to make user edits go through a review process before they can be published/go live? I realize that this goes against the basic concept of a wiki in some ways, and I explained to our manager that we have version rollback capability, but she wants these controls in place prior to publishing. Can anyone offer some guidance? ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Approval process for user edits?
Hi John, Edo, please see my replies below. On Thu, Aug 4, 2011 at 2:09 PM, Edo Beutler ebeut...@synventis.com wrote: Hi John, Since we program such functionalities in Java components and not in scripts I cant give you details on how to do it in Groovy, but I hope I can explain Guillaume's idea of the script. I think his idea was the following: Register a listener to the save action. Doing this, your script / method will always be called when a document gets saved. When that happens you check for the saved document the field on your ApprovalStatusClass and change the view rights on the document accordingly if a change happened. So, if the reviewer checked a document and changes the status to approved you change the view rights of this document. I hope this clarifies Guillaume's idea a bit ... and I understood the idea correctly ;-) Absolutely, that's exactly what I meant :-) However, given that John is not a developer I'm afraid this solution is going a bit tough for him to implement by himself. Edo On Wed, Aug 3, 2011 at 9:20 PM, Campbell, John john.campb...@viasat.com wrote: Hi Guillaume, I understand some of the concepts to which you're referring, but I'm more of a writer/content guy, so my understanding of the code/scripting is very limited. I'll try to follow along. I've created a class called ApprovalStatus and made it a static list with the following values: in review|approved|rejected. I created the ApprovalStatusClass Sheet and ApprovalStatusClass Template, as well. That's a good start :-) Here are some things I would like to be able to do with this class. Can you tell me if these are feasible? Yes, all 3 are feasible. 1. Attach the class to the process document template I have already created that users will use when they create new pages. You'd need to write a script to find all such pages and automatically add an object of the right type to the pages. You can also do this manually using the object editor. 2. Have the class default to the in review value. This can be set either by your script and/or by doing it manually through the object editor. 3. Make this element invisible to the Users group, but visible and editable to the Supervisors group (for example, a Supervisor would be able to review a page that is in review, and then if it is acceptable, change the status to approved). This is something you can achieve in the sheet using the $xwiki.isUserInGroup('XWiki.SomeGroup') API: {{velocity}} #if($context.user.isUserInGroup('XWiki.SomeGroup')) your code goes here #end {{/velocity}} I'm not sure I completely follow what you're talking about with the script section of your comment. But I would love to learn more. Can you elaborate a bit more, please? Please see Edo's clarification above. Hope this helps, Guillaume Thanks, John -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume Lerouge Sent: Wednesday, August 03, 2011 2:55 AM To: XWiki Users Subject: Re: [xwiki-users] Approval process for user edits? Hi John, - Create a process class with a validation status (under review, validated...) [1] - Create a groovy script that listens for changes of the value of the status property and updates a XWikiRights object attached to the page based on the value of the validation status property [2] - - when the status changes, the script will apply appropriate rights to the page - - you can list only validated on the homepage of one of your Hope this helps, Guillaume [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+Using+Groovy On Tue, Aug 2, 2011 at 8:07 PM, Dale Amon a...@vnl.com wrote: On Tue, Aug 02, 2011 at 05:45:09PM +, Campbell, John wrote: Hello again, XWiki community. I am working on using XWiki to be the repository for a library of process documents that will be added to and updated on a constant basis by members of our team. It looks like it's going to be a great resource for us. However, I do have a question that involves rights and permissions. Our manager wants to incorporate an approval process in the process document wiki. She wants users to be able to edit existing process documents and create new process documents, but for those documents to go through a technical/style review by supervisors before they are published for use by the team. I don't see a way to manage permissions/rights to make that idea work for the wiki as a whole, though I can see a workaround for new process documents (force them to be created in a Review space). Is there a way to make user edits go through a review process before they can be published/go live? I realize that this goes against the basic concept of a wiki in some ways, and I
Re: [xwiki-users] Approval process for user edits?
Hi, Guillaume and Edo. Thanks for the clarification, Edo. I'm pretty sure I understand the concepts here now. I have one document template that I'll be using for all of my process documents, and I added the following line to the bottom of the template: {{include document=XWiki.ApprovalStatusSheet/}} I have tested it, and it appears that each new document using that template includes that element, so that takes care of my first question about being able to attach the class to the template. :) As for my other two questions, allow me to follow up a bit: 2. Have the class default to the in review value. This can be set either by your script and/or by doing it manually through the object editor. Guillaume, I have gone into edit mode on the XWiki.ApprovalStatusClass, and I see where I set the Values for the class, but I don't see where I can set the default. Do you know of any examples you can point me to in the documentation that might illustrate where I need to go and what I need to do more thoroughly? 3. Make this element invisible to the Users group, but visible and editable to the Supervisors group (for example, a Supervisor would be able to review a page that is in review, and then if it is acceptable, change the status to approved). This is something you can achieve in the sheet using the $xwiki.isUserInGroup('XWiki.SomeGroup') API: {{velocity}} #if($context.user.isUserInGroup('XWiki.SomeGroup')) your code goes here #end {{/velocity}} So this is something I would include in the Xwiki.ApprovalStatusSheet? This is what is currently in that sheet: {{velocity}} #set($class = $doc.getObject('XWiki.ApprovalStatusClass').xWikiClass) #foreach($prop in $class.properties) ; $prop.prettyName : $doc.display($prop.getName()) #end {{/velocity}} It sounds like you're saying that the $xwiki.isUserInGroup('XWiki.SomeGroup') API will do a check to see if the user is in the correct group, and if so, then the subsequent lines of code will execute, making that field visible. Is my understanding correct? Is there a way to make the ApprovalStatus class display as a drop-down box for supervisors/admins? I'm sorry for all the questions, but I'd really like to be able to demonstrate this functionality to my manager. I think XWiki is ideal for this project, but having this functionality is critical. I sincerely appreciate all the help. John -Original Message- From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of Guillaume Lerouge Sent: Thursday, August 04, 2011 7:09 AM To: XWiki Users Subject: Re: [xwiki-users] Approval process for user edits? Hi John, Edo, please see my replies below. On Thu, Aug 4, 2011 at 2:09 PM, Edo Beutler ebeut...@synventis.com wrote: Hi John, Since we program such functionalities in Java components and not in scripts I cant give you details on how to do it in Groovy, but I hope I can explain Guillaume's idea of the script. I think his idea was the following: Register a listener to the save action. Doing this, your script / method will always be called when a document gets saved. When that happens you check for the saved document the field on your ApprovalStatusClass and change the view rights on the document accordingly if a change happened. So, if the reviewer checked a document and changes the status to approved you change the view rights of this document. I hope this clarifies Guillaume's idea a bit ... and I understood the idea correctly ;-) Absolutely, that's exactly what I meant :-) However, given that John is not a developer I'm afraid this solution is going a bit tough for him to implement by himself. Edo On Wed, Aug 3, 2011 at 9:20 PM, Campbell, John john.campb...@viasat.com wrote: Hi Guillaume, I understand some of the concepts to which you're referring, but I'm more of a writer/content guy, so my understanding of the code/scripting is very limited. I'll try to follow along. I've created a class called ApprovalStatus and made it a static list with the following values: in review|approved|rejected. I created the ApprovalStatusClass Sheet and ApprovalStatusClass Template, as well. That's a good start :-) Here are some things I would like to be able to do with this class. Can you tell me if these are feasible? Yes, all 3 are feasible. 1. Attach the class to the process document template I have already created that users will use when they create new pages. You'd need to write a script to find all such pages and automatically add an object of the right type to the pages. You can also do this manually using the object editor. 2. Have the class default to the in review value. This can be set either by your script and/or by doing it manually through the object editor. 3. Make this element invisible to the Users group, but visible and editable to the Supervisors group (for example, a Supervisor would be able to review a page that is in review, and
Re: [xwiki-users] Installing XWiki on Ubuntu Natty
Hi Dale, I had a similar error 'Could not create a DBCP pool' when I first installed XEM on a Suse linux box, while all the rest seemed OK. So I tried to look inside Tomcat installation: open .../conf/server.xml and go to the line that starts with Connector port=8080 protocol =HTTP/1.1 . Comment all this section. Immediately after starts a section that is commented by default that starts witn the line Connector executor=tomcatThreadPool Make this section live and add as suggested somewhere in the tutorial the line URIEncoding=UTF-8 Restart everything. It worked for me, even if I don't really know why (I am not a programmer or Java/Tomcat guru). Hope that can help you, too Angelo -- View this message in context: http://xwiki.475771.n2.nabble.com/Installing-XWiki-on-Ubuntu-Natty-tp6645828p6653024.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Installing XWiki on Ubuntu Natty
On Thu, Aug 04, 2011 at 07:44:41AM -0700, AngeloG wrote: Hi Dale, I had a similar error 'Could not create a DBCP pool' when I first installed XEM on a Suse linux box, while all the rest seemed OK. So I tried to look inside Tomcat installation: open .../conf/server.xml and go to the line that starts with Connector port=8080 protocol =HTTP/1.1 . Comment all this section. Immediately after starts a section that is commented by default that starts witn the line Connector executor=tomcatThreadPool Make this section live and add as suggested somewhere in the tutorial the line URIEncoding=UTF-8 Restart everything. It worked for me, even if I don't really know why (I am not a programmer or Java/Tomcat guru). Hope that can help you, too Angelo I did the following: !-- DMA20110804 Commented out as suggested by AngeloG-- !-- A Connector represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 Connector port=8080 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 / -- !-- A Connector using the shared thread pool-- !-- DMA20110804 Uncommented and added URIEncoding as suggested by AngeloG-- Connector executor=tomcatThreadPool port=8080 protocol=HTTP/1.1 connectionTimeout=2 URIEncoding=UTF-8 redirectPort=8443 / Rebooted the VM even, But I still get: javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Another XEM installation problem
Any other ideas? I'm at a total loss... aaron On Tue, Aug 2, 2011 at 12:14 PM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Yep, When I connect with: xxx.xxx.xxx.xxx:9001/xwiki I just get a 404. Changing it back to the domain name, I get the same 500 error. Connecting to my IP:9001 brings up my Tomcat administration page just fine - so I can verify that the servlet is running on that port at that IP. I have the following file in my xwiki/WEB-INF/lib directory: mysql-connector-java-5.1.17-bin.jar Very confusing... aaron On Tue, Aug 2, 2011 at 11:52 AM, Guillaume Fenollar guillaume.fenol...@xwiki.com wrote: Hi aaron, It seems to be a mysql-java-connector issue. Since you're sure to have added the mysql-java-connector.jar file in xwiki/WEB-INF/lib, I barely understand what is happening. Can you try to access the wiki using the ip address instead of name? Guillaume 2011/8/2 Ashtar Communications ashtarcommunicati...@gmail.com Sorry, forgot: Yes, I did install the mysql jar in the lib directory. aaron On Tue, Aug 2, 2011 at 11:40 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Thank you for the suggestion. Yes, I am trying to set up XEM. I ultimately will need to run a farm of wikis. I have not yet tried installing the basic XE and then manually setting up virtual wikis, because I would prefer to use the built-in management tools if possible. I changed the xwiki.cfg file to reflect my database name, but the error stays exactly the same. Any other ideas? Thanks, aaron On Tue, Aug 2, 2011 at 7:12 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 2011-08-01 12:41 AM, Ashtar Communications ashtarcommunicati...@gmail.com wrote: Hi, I am trying to get XEM set up and am running into an HTTP 500 error that I am unsure how to resolve. I originally went through the XEM installation tutorial without any results, and thought the problem was related to port configuration. My hosting provider said that my tomcat instance was running on port 9001 and could not be changed. Now, connecting to host.com:9001/xwiki brings up the following: HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:627) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) root cause com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3001 in 3: Cannot load class com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager from param xwiki.store.migration.manager.class Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: Could not create a DBCP pool. There is an error in the hibernate configuration file, please review it. com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:424) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:493) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:135) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)