Hi,
>> Are you sure wikiname (not a very good variable name ;) ) includes the
>> "XWiki." prefix?
When I try to use createEmptyUser(xwikiname, userRights, context) from an XWiki object (context.getWiki()) if I manually add "XWiki." in the "xwikiname" it creates an "XWiki.mynewuser", but on the Admin Users page it doesn't looks like a normal user, it lacks many of the the user properties and doesn't have the XWiki.XWikiUserSheet in it's content, also when I try to get it's XWikiDocument it appears as XWiki.XWiki.mynewuser.
I'm working with XWiki version 2.4 (xwiki-core-2.4.jar
Currently, I'm checking how XWikiSunSSOAuthenticator does it, checking what I do wrong.
Thank you,
Marco A. Gonzalez
Date: Fri, 25 Mar 2011 11:44:30 +0200
From: Marius Dumitru Florea <mariusdumitru.florea(a)xwiki.com>
Subject: Re: [xwiki-devs] CAS Integration + new User creation
Hi Marco,
On 03/25/2011 10:40 AM, Marco Antonio Gonz?lez wrote:
> 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);
Are you sure wikiname (not a very good variable name ;) ) includes the
"XWiki." prefix?
> this.context.getWiki().createEmptyUser(wikiname, "edit", context);
> }
> context.setUser(wikiname);
References are resolved relative to the current context:
Foo -> currentWiki:currentSpace.Foo
Bar.Foo -> currentWiki:Bar.Foo
wiki:Bar.Foo -> wiki:Bar.Foo
Hope this helps,
Marius
> 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
Thank you, i'll check it.
Regards,
Marco A. González
----- Reply message -----
De: "Kevin Foote" <kpfoote(a)iup.edu>
Para: "Marco Antonio González" <magonzalez(a)grupointermark.com>, "Developers at xwiki. org (devs(a)xwiki.org)" <devs(a)xwiki.org>
Asunto: [xwiki-devs] CAS Integration + new User creation
Fecha: vie., mar. 25, 2011 10:06
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
I don't see any reason that would force us to support 2.2.x (if you
can run 2.2 there is no reason you can't run 3.0, it's not like 3.0
was working on minimum Java 6 or something) and that would improve our
ci build.
Plus I pref having a build detified working on 3.0 than 2.2 and I
don't want to build everything twice with both maven versions on our
ci build just for that.
WDYT ?
--
Thomas Mortagne
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
Hi devs,
I'd like to start moving very old plugins out of the core and into the
contrib/retired repository.
For the moment, this includes:
- PatternPlugin (regexp based text replacements when running the old
rendering engine)
- TablePlugin (pre-Radeox support for wiki table syntax)
- GooglePlugin (search and spelling suggestions)
- GraphViz (graph drawing, unmaintained for a long time; should be
replaced with a component)
- MailPlugin (unmaintained mailbox reading plugin)
- QueryPlugin (old, unused precursor of the query service)
- SVG (old, unmaintained plugin; should be replaced with a component)
- testPlugin (test plugin, writen as a test plugin to test the plugin
functionality :) )
- XWikiUserManagementTools (precursor for the invitation application,
unmaintained)
The remaining plugins must be rewritten as components first, since they
still provide useful functionality.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
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