Marco,
I followed the sun-sso example here.
It should get you pointed in the right direction.
http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/authenticators/
Sent from mobile
----- Reply message -----
From: "Marco Antonio González" <magonzalez(a)grupointermark.com>
Date: Fri, Mar 25, 2011 4:40 am
Subject: [xwiki-devs] CAS Integration + new User creation
To: "Developers at xwiki. org (devs(a)xwiki.org)" <devs(a)xwiki.org>
Hi all,
I'm new developing with XWiki, and I'm not sure this list is the correct to post this, so sorry in advance for any inconvenience and my bad english.
I'm trying to get an integration with CAS Auth instead of own XWiki Auth, but when I try to create a user on my own implementation of XWikiAuthServiceImpl, the user is created on XWiki space, but when i log into XWiki and Main is my default Space, the Profile link on top points to /xwiki/bin/view/Main/mynewuser instead of /xwiki/bin/view/XWiki/mynewuser where I can edit his first name, surname, etc. Is this the default behaviour? If not, any suggestions of what I do wrong?
The autentication code is, in my CASAuthServiceImpl class:
public XWikiUser checkAuth(XWikiContext context) throws XWikiException {
String remoteUser = context.getRequest().getRemoteUser();
String wikiname = "";
if ((remoteUser == null) || remoteUser.equals("")) {
getLogger().warn("checkAuth: User cannot be authenticated (REMOTE_USER is null)");
try {
context.getResponse().sendRedirect("/cas/login");
} catch (IOException ioe) {
getLogger().warn("checkAuth: CAS Error. Let XWiki handle it. ");
return super.checkAuth(context);
}
} else if (remoteUser.equalsIgnoreCase("xwiki")) {
getLogger().warn("checkAuth: User is XWIKI (superadmin)");
wikiname = "XWiki.superadmin";
} else {
XWiki wiki = context.getWiki();
wikiname = wiki.clearName(remoteUser, true, true, context);
this.context.getWiki().createEmptyUser(wikiname, "edit", context);
}
context.setUser(wikiname);
return new XWikiUser(wikiname);
} catch (XWikiException e) {
getLogger().error("checkAuth: Cannot validate user. " + e.getMessage());
throw e;
}
Thank you,
Marco A. Gonzalez
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
On Mar 24, 2011, at 8:28 AM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2011-03-24 08:28:33 +0100 (Thu, 24 Mar 2011)
> New Revision: 35963
>
> Modified:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-code/src/main/java/org/xwiki/rendering/internal/parser/pygments/PygmentsParser.java
> Log:
> XWIKI-6164: PyGments: Failed to highlight content when web server is rendering another page in the same time
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-code/src/main/java/org/xwiki/rendering/internal/parser/pygments/PygmentsParser.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-code/src/main/java/org/xwiki/rendering/internal/parser/pygments/PygmentsParser.java 2011-03-24 02:11:29 UTC (rev 35962)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-code/src/main/java/org/xwiki/rendering/internal/parser/pygments/PygmentsParser.java 2011-03-24 07:28:33 UTC (rev 35963)
> @@ -210,7 +210,7 @@
> * @return the highlighted version of the provided source.
> * @throws ParseException the highlighting failed.
> */
> - private List<Block> highlight(String syntaxId, String code) throws ParseException
> + private synchronized List<Block> highlight(String syntaxId, String code) throws ParseException
> {
> PythonInterpreter interpreter = getPythonInterpreter();
Cool that we fixed this one!
IMO we need a comment mentioning that getPythonInterpreter() is not thread safe (if that's the problem).
Thanks
-Vincent
> BlocksGeneratorPygmentsListener listener = new BlocksGeneratorPygmentsListener(this.plainTextParser);
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
On Wed, Mar 23, 2011 at 15:31, mflorea <platform-notifications(a)xwiki.org> wrote:
> Author: mflorea
> Date: 2011-03-23 15:31:42 +0100 (Wed, 23 Mar 2011)
> New Revision: 35841
>
> Modified:
> platform/core/trunk/pom.xml
> Log:
> [release] release plugin fails to create branch for xwiki-core. Try to set commons.version to an explicit value.
>
> Modified: platform/core/trunk/pom.xml
> ===================================================================
> --- platform/core/trunk/pom.xml 2011-03-23 14:12:57 UTC (rev 35840)
> +++ platform/core/trunk/pom.xml 2011-03-23 14:31:42 UTC (rev 35841)
> @@ -39,7 +39,7 @@
> <properties>
> <!-- Versions of XWiki dependencies used in Core modules -->
> <rendering.version>${project.version}</rendering.version>
> - <commons.version>${project.version}</commons.version>
> + <commons.version>3.0-SNAPSHOT</commons.version>
It's more correct that way anyway but I did not expected it to fail to
branch/release because of that.
> <!-- The previous stable version of this project, used to catch API breakages. -->
> <clirr.previous.version>2.7</clirr.previous.version>
> </properties>
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
--
Thomas Mortagne
Dear Thomas Mortagne
I am very excited to contribute in open source community through the
platform of Google Summer of Code 2011. I have visited the ideas page
of “XWiki” at http://dev.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/ for
GSoC 2011. I am interested in working on “Google Android client” for XWiki.
The reason being is my interest in smartphone development. I have previously
worked in Windows Phone 7 and to some extent in Blackberry. I want to
experience development in other platforms such as Android. I've worked in
Java, CSS, HTML and Javascript.
I am writing to let you know my understanding of the project and would like
your feedback on it. My understanding of the requirements is as follows:
- To develop a smartphone application for XWiki.
- The application should be able to navigate wiki spaces and pages.
- The application should allow offline editing of wiki space and pages
and synchronise results on connecting with the repository.
- The application should also allow users an option to launch a browser
window.
I have some knowledge of XML-RPC client/server communication. However, you
mentioned you are interested in using REST API for such communication. Does
XWiki already have REST API or this API needs to be created as part of this
project. Would you please refer me some material to study in this regard?
I look forward to your response.
Regards
Rauf
University of Gloucestershire
Hello All,
I am writing this to be a self introductory mail to the XWiki community. I
am a Computer Engineering student at the University of Duisburg Essen,
Germany.
I am interested in the undertaking the Android related project for Summer of
Code,I am interested primarily in the long term project of building a
library to be used in XWiki android clients.
In the area of programming capabilities, I have experience with the tools
and technologies as detailed on the xwiki development wiki, I primarily use
Eclipse and have used Maven, Ant, Git and others for several school and
personal project (Android applications).
(I am looking forward though to getting more exposure on these and others by
joining and using them in an open source community).
I have been able to checkout the source, but kinda in a jungle now, because
there are a lot of projects. Will be glad if any one can point me in the
right direction, with regards to where I should look first in relationship
to the project I want to undertake.
Regards.
--
Chris Pels
On 03/23/2011 05:59 PM, nikhil gupta wrote:
> Hello,
> I have gone though the form editing part of the xwiki,where we can include
> the fields according to the requirement.
> As per the requirement of our project (AJAX FORM EDITOR) we have to provide
> one USER INTERFACE for the user through which he can drag /drop the fields
> according to his form requirement.
>
> We can extend this idea a little bit .We will not only provide the form
> generation part but also include its action part i.e user will give the
> name of the database where the action has to take place(if have to insert
> the record or update the record in the database).
That's not needed. The application logic is already handled by XWiki,
this is by definition what XWiki applications do. I suggest reading and
following the FAQ tutorial in order to understand better how structured
data works in XWiki, and to see in which context the form editor is
needed: http://platform.xwiki.org/xwiki/bin/DevGuide/FAQTutorial
> Moreover, we can also add
> style for each field where user can define its style according to its choice
> and we can also provide the style sheet for the whole form also.
The form editor should not be too complex, it should offer an easy way
of editing simple forms. This allows the UI to remain easy to use and
understand, and also ensures a consistent look of different applications
in the same wiki. For more complex forms, there's the lower-level class
editor and the scripting support in the class sheet. For styling support
in XWiki, you should take a look at SkinExtensions:
http://platform.xwiki.org/xwiki/bin/DevGuide/SkinExtensionsTutorial
> User will select the type of the field for example in the form there are
> certain fields which get insert ,some gets updated when the form gets
> submitted,so according to the nature and requirement, user will enter the
> type of the field.Types can be "INSERT","UPDATE","VIEW" etc.
Again, follow the FAQ tutorial to see that there's no need for such
low-level database operations. See also a bit more documentation about
the data model: http://platform.xwiki.org/xwiki/bin/DevGuide/DataModel
> So for this we can use the resources which is present in the xwiki,in that
> we have all the fully functional fields , we can make any field , so our
> work will now to provide the interface for the user where he can drag/drop
> the fields and also provide the interface for the style part and also to
> create the action file and rendering file which would render the
> requirement.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hello,
I have gone though the form editing part of the xwiki,where we can include
the fields according to the requirement.
As per the requirement of our project (AJAX FORM EDITOR) we have to provide
one USER INTERFACE for the user through which he can drag /drop the fields
according to his form requirement.
We can extend this idea a little bit .We will not only provide the form
generation part but also include its action part i.e user will give the
name of the database where the action has to take place(if have to insert
the record or update the record in the database).Moreover, we can also add
style for each field where user can define its style according to its choice
and we can also provide the style sheet for the whole form also.
User will select the type of the field for example in the form there are
certain fields which get insert ,some gets updated when the form gets
submitted,so according to the nature and requirement, user will enter the
type of the field.Types can be "INSERT","UPDATE","VIEW" etc.
So for this we can use the resources which is present in the xwiki,in that
we have all the fully functional fields , we can make any field , so our
work will now to provide the interface for the user where he can drag/drop
the fields and also provide the interface for the style part and also to
create the action file and rendering file which would render the
requirement.
Thnx
Nikhil Gupta
--
Nikhil Gupta
BTech CSE III yr
IIIT Hyderabad
Hyderabad 500032
Note that this not correct and you've just removed one test which was to check that the current tab is the Comments tab.
This needs to be rolled-back (or another test that verifies that the comments tab is the first one needs to be added) and the comments tab needs to be put back as the first tab (this was discussed on IRC yesterday).
Thanks
-Vincent
On Mar 23, 2011, at 4:49 AM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2011-03-23 04:49:01 +0100 (Wed, 23 Mar 2011)
> New Revision: 35817
>
> Modified:
> enterprise/trunk/distribution-test/selenium-tests/src/test/it/org/xwiki/test/selenium/CommentTest.java
> Log:
> [misc] Fixed failing tests
>
> Modified: enterprise/trunk/distribution-test/selenium-tests/src/test/it/org/xwiki/test/selenium/CommentTest.java
> ===================================================================
> --- enterprise/trunk/distribution-test/selenium-tests/src/test/it/org/xwiki/test/selenium/CommentTest.java 2011-03-23 03:09:08 UTC (rev 35816)
> +++ enterprise/trunk/distribution-test/selenium-tests/src/test/it/org/xwiki/test/selenium/CommentTest.java 2011-03-23 03:49:01 UTC (rev 35817)
> @@ -120,6 +120,7 @@
> loginAsAdmin();
> }
> open("CommentTest", "PageWithSomeComments");
> + loadCommentsTab();
>
> // Wait until comments load though ajax mechanism.
> waitForElement("//div[@id='_comments']/form[@id='AddComment']/fieldset[@id='commentform']");
> @@ -147,6 +148,7 @@
> if (!isAuthenticated()) {
> loginAsAdmin();
> }
> + loadCommentsTab();
> if (!isElementPresent("//div[@class='commentheader']/div/span[@class='commentauthor']/span/a")) {
> postComment("This comment will be edited.", null, true);
> }
> @@ -207,6 +209,7 @@
>
> public void postComment(String comment, String author, boolean doubleCheck)
> {
> + loadCommentsTab();
> setCommentContent(comment);
> if (author != null) {
> setCommentAuthor(author);
> @@ -233,6 +236,14 @@
> return getSelenium().getAttribute("//input[@name='XWiki.XWikiComments_author']@value");
> }
>
> + public void loadCommentsTab()
> + {
> + if (isElementPresent("//a[@id='Commentslink']")) {
> + clickLinkWithXPath("//a[@id='Commentslink']", false);
> + waitForCondition("selenium.browserbot.findElement(\"Commentspane\").className.indexOf(\"empty\") == -1");
> + }
> + }
> +
> public void setCommentContent(String content)
> {
> waitForElement("//textarea[@id='XWiki.XWikiComments_comment']");