Re: [xwiki-users] Configuring LDAP.

2016-04-18 Thread Sebastien.Boulianne
I used that link to configure my LDAP authentification.
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/LDAPAuthenticationUseCases


-Message d'origine-
De : users [mailto:users-boun...@xwiki.org] De la part de 
sebastien.boulia...@cpu.ca
Envoyé : 18 avril 2016 15:23
À : users@xwiki.org
Objet : [xwiki-users] Configuring LDAP.

Hi all,

Im running Xwiki 7.0.1 and I would like to configure LDAP Authentification.
I configured my xwiki.cfg like that http://pastebin.com/08DAw0eb BUT I can't 
connect with my AD user.

Can you help me to setup this features please ?

Thanks you very much in advance.

Sébastien

___
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


[xwiki-users] Configuring LDAP.

2016-04-18 Thread Sebastien.Boulianne
Hi all,

Im running Xwiki 7.0.1 and I would like to configure LDAP Authentification.
I configured my xwiki.cfg like that http://pastebin.com/08DAw0eb
BUT I can't connect with my AD user.

Can you help me to setup this features please ?

Thanks you very much in advance.

Sébastien

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Disabling javascript in HTML macro

2016-04-18 Thread Andrew Kuang
Thank you for the responses, Vincent and Marius.

After playing around with the HTML macro, I came across a potential
solution. It appears that all the XWiki-created pages reside within certain
spaces (xwiki:Wiki, xwiki:WikiManager, etc). With that in mind, I was able
to prototype an override for the HTML macro that whitelisted specific wiki
spaces (Wiki, WikiManager, etc) and potentially lock down the creation/edit
of pages in those spaces to the Admin group. This way we would be able to
avoid conflicting with any existing Javascript usage while preventing
outside (non-admin) users from using JavaScript on their pages.

In the event that the page in question is not part of the whitelisted space
and contains Javascript, we would return an error block with an error
message instead of rendering the content passed into the HTML macro. I
wanted to get any input on if this is a viable solution or if there are any
crucial parts I may have overlooked that jeopardize this approach. Thank
you!



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Disabling-javascript-in-HTML-macro-tp7599019p7599044.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] Advice on building simple app

2016-04-18 Thread Ecaterina Moraru (Valica)
Hi Tim,

Have you tried using AWM?
http://extensions.xwiki.org/xwiki/bin/view/Extension/App+Within+Minutes+Application

After you have the structure you can try to modify the Sheet page and add
conditionals.

Thanks,
Caty

On Mon, Apr 18, 2016 at 6:11 PM, Tim Dudgeon <
tdudg...@informaticsmatters.com> wrote:

> Hi all,
>
> I'm wanting to create a simple XWiki "app" and being new to this wanted to
> get some advice before starting.
> What I want is probably not too far removed from the FAQ app, so it may
> well look a bit like this, but I wanted to get some pointers before heading
> off in the wrong direction.
>
> The app is essentially a directory of "things" where each "thing" will be
> its own wiki page, and there will be a master page that lists them all and
> allow pagination, filtering etc. (livetable etc.)
> The "things" will have a small number of "fields", not too different from
> the FAQ app. But where it may differ is that the page for each "thing"
> should also allow free form editing of the wiki page so that arbitrary
> additional info can be added (even including scripts etc.) This arbitrary
> extra info will just be part or the page, not part of the directory.
> The page for each "thing" will therefore be a combination of structured
> info (the fields) appearing at the top of the page in a consistent manner
> across all pages), and non-structured info appearing below this.
>
> All advice greatly appreciated.
>
> Tim
>
> ___
> 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] XWiki Button with ActionListener?

2016-04-18 Thread Mohamed Boussaa
Hello,

Here is the XWiki Developer's Guide:
http://platform.xwiki.org/xwiki/bin/view/DevGuide/


Regards,
Mohamed.

On Mon, Apr 18, 2016 at 1:28 PM, Rochlin Oleg  wrote:

> Hello my fellow XWIKI-people.
> I would like to create a button to generate some content.
>
> Pseudo-code example
>
> {{velocity}}
>
> #set(button=false)
>
> Click this Button causes #set(button=true)
>
> #if($button)
>
> script starts
>
> #end
>
> {{/velocity}}
>
> Any ideas? I am pretty new to WIKI
>
> Mit freundlichen Grüßen / Best regards
>
> Oleg Rochlin | Werkstudent | System implementation
> SSI SCHÄFER | SSI Schäfer Noell GmbH | i_Park Klingholz 18/19 | 97232
> Giebelstadt | Germany
>
> oleg.roch...@ssi-schaefer.com
>
> Website | Blog<
> http://www.ssi-schaefer.de/blog> | YouTube<
> http://youtube.com/lagerlogistik1> | Facebook<
> http://facebook.com/SSI.SCHAEFER.DE>
>
>
> SSI Schäfer Noell GmbH | 97232 Giebelstadt | Germany
> Incorporated in Würzburg | Commercial Register B 6936 | VAT no. DE170860279
> Managing Directors: Rudolf Keller, Henricus Swinkels
>
> ___
> 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] Disabling javascript in HTML macro

2016-04-18 Thread Vincent Massol
Hi Andrew,


> On 15 Apr 2016, at 22:56, Andrew Kuang  wrote:
> 
> Hi,
> 
> I wanted to assess how difficult it might be to disable all javascript
> execution in HTML macros on XWiki. My main concern would be to avoid
> breaking any important XWiki pages that utilize javascript within the HTML
> macro (as referenced here:
> http://lists.xwiki.org/pipermail/users/2009-June/012226.html). Is there any
> XWiki functionality that is still dependent on executing javascript via
> {{html}}?
> 
> I also noticed in the comments on this JIRA issue
> (https://jira.xwiki.org/browse/XRENDERING-27?jql=text%20~%20%22html%20macro%20script%22),
> Vincent Massol mentioned that wiki macros 2.0 will be designed in such a way
> that we can override the HTML macro and filter out javascript usages. I was
> wondering if this was still the best solution to disabling future javscript
> usage within {{html}}. Thank you!

While googling I’ve found this solution 
http://kudzia.eu/b/2014/11/xwiki-html-macro-tag-and-unwanted-javascript/

Would that work for you?

I remember that Thomas Delafosse worked on some code to filter out javascript 
and other tags from the HTML Macro but I don’t remember the status. I’ve just 
found this email thread: 
http://lists.xwiki.org/pipermail/devs/2013-June/054519.html


Thanks
-Vincent

> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Disabling-javascript-in-HTML-macro-tp7599019.html

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Advice on building simple app

2016-04-18 Thread Tim Dudgeon

Hi all,

I'm wanting to create a simple XWiki "app" and being new to this wanted 
to get some advice before starting.
What I want is probably not too far removed from the FAQ app, so it may 
well look a bit like this, but I wanted to get some pointers before 
heading off in the wrong direction.


The app is essentially a directory of "things" where each "thing" will 
be its own wiki page, and there will be a master page that lists them 
all and allow pagination, filtering etc. (livetable etc.)
The "things" will have a small number of "fields", not too different 
from the FAQ app. But where it may differ is that the page for each 
"thing" should also allow free form editing of the wiki page so that 
arbitrary additional info can be added (even including scripts etc.) 
This arbitrary extra info will just be part or the page, not part of the 
directory.
The page for each "thing" will therefore be a combination of structured 
info (the fields) appearing at the top of the page in a consistent 
manner across all pages), and non-structured info appearing below this.


All advice greatly appreciated.

Tim

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] xWiki RESTful/HTTP Connection

2016-04-18 Thread Tobi
For some reasons it gives me this

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/logging/LogFactory
at org.apache.commons.httpclient.HttpClient.(HttpClient.java:65)
at RestTest2.getClient(RestTest2.java:16)
at RestTest2.main(RestTest2.java:27)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more

Code:

import java.io.IOException;

import org.apache.commons.httpclient.HttpClient; 
import org.apache.commons.httpclient.methods.GetMethod; 
import org.apache.commons.httpclient.methods.PutMethod;
import org.xwiki.rest.model.jaxb.ObjectFactory;
import org.xwiki.rest.model.jaxb.Page;
import org.apache.commons.httpclient.methods.PostMethod; 
import org.apache.commons.httpclient.UsernamePasswordCredentials; 
import org.apache.commons.httpclient.auth.AuthScope; 
import org.apache.commons.httpclient.NameValuePair; 

public class RestTest2 {

 static HttpClient getClient(String host, int port, String username, 
String
password) { 
  HttpClient httpClient = new HttpClient(); 
  httpClient.getParams().setAuthenticationPreemptive(true); 
  httpClient.getState().setCredentials( 
 new AuthScope(host, port, AuthScope.ANY_REALM), 
 new UsernamePasswordCredentials(username, password) 
  ); 
  return httpClient; 
   } 

   public static void main(String[] args) throws IOException { 
 // Get request example 
  HttpClient httpClient = getClient("xwiki.aircr.ru", 8080, "Tobi", 
"gaben1337"); 
  GetMethod getMethod = new
GetMethod("http://xwiki.aircr.ru/xwiki/bin/view/Main/;); 
  getMethod.addRequestHeader("Accept", "application/json"); 
  getMethod.setDoAuthentication( true ); 
  String getURL = "http://xwiki.aircr.ru/xwiki/bin/view/Main/;; 
  try { 
  int status = httpClient.executeMethod(getMethod); 
 System.out.println(getMethod.getResponseBodyAsString()); 
   } catch (Exception e) { 
 //... 
  } finally { 
  // release any connection resources used by the method 
  getMethod.releaseConnection(); 
   } 

  // Put request example 
  String putURL = "http://xwiki.aircr.ru/xwiki/bin/view/Main/;; 
  PutMethod putMethod = new PutMethod(putURL); 
putMethod.addRequestHeader("Accept", "application/json"); 
putMethod.setDoAuthentication( true ); 
try { 
   int status = httpClient.executeMethod(putMethod); 
  System.out.println(putMethod.getResponseBodyAsString()); 
} catch (Exception e) { 
   // ... 
  } finally { 
   // release any connection resources used by the method 
  putMethod.releaseConnection(); 
} 
  } 

}



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/xWiki-RESTful-HTTP-Connection-tp7599026p7599035.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


[xwiki-users] XWiki Button with ActionListener?

2016-04-18 Thread Rochlin Oleg
Hello my fellow XWIKI-people.
I would like to create a button to generate some content.

Pseudo-code example

{{velocity}}

#set(button=false)

Click this Button causes #set(button=true)

#if($button)

script starts

#end

{{/velocity}}

Any ideas? I am pretty new to WIKI

Mit freundlichen Grüßen / Best regards

Oleg Rochlin | Werkstudent | System implementation
SSI SCHÄFER | SSI Schäfer Noell GmbH | i_Park Klingholz 18/19 | 97232 
Giebelstadt | Germany

oleg.roch...@ssi-schaefer.com

Website | Blog | 
YouTube | 
Facebook


SSI Schäfer Noell GmbH | 97232 Giebelstadt | Germany
Incorporated in Würzburg | Commercial Register B 6936 | VAT no. DE170860279
Managing Directors: Rudolf Keller, Henricus Swinkels

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Hide Harder-Bar on Login-Screen

2016-04-18 Thread Marius Dumitru Florea
On Sat, Apr 16, 2016 at 9:46 PM, Matthias Wegner 
wrote:

> Hi Users,
>
> i want to hide the header bar on the login screen and marked for that
>
> ###template("startpage.vm")
>
> out in login.vm. Then i restart the server. But nothing changed. I cleared
> the browser cache but this is not the problem.
>
> Is this not the right place?
>

Are you editing skins/flamingo/login.vm ?


>
> Regards,
> Matthias
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Hide-Harder-Bar-on-Login-Screen-tp7599022.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] xWiki RESTful/HTTP Connection

2016-04-18 Thread Mohamed Boussaa
Hi,

I forget to add the packages to import in my previous code.

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.NameValuePair;


Find the API of the PutMethod here:
https://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/methods/PutMethod.html



Regards,
Mohamed.




On Sun, Apr 17, 2016 at 10:02 PM, Tobi  wrote:

> Thank you for your response!
>
> As far as I know there is no PutMethod (which you use in your code) class
> in
> new versions of Apache's HTTP library. Same goes for many other methods
> which.
>
> Or maybe I'm just missing the point and there IS a library with required
> Classes and Methods of which I know nothing about (if it's true then I
> would
> be really grateful if your provide me a link).
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/xWiki-RESTful-HTTP-Connection-tp7599026p7599028.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Disabling javascript in HTML macro

2016-04-18 Thread Marius Dumitru Florea
The HTML macro doesn't execute JavaScript code. It outputs HTML code that
ends up being interpreted by the browser. So in order to prevent the
execution of the JavaScript code that might be embedded in the HTML code
generated by the HTML macro, the options are:

(1) prevent the usage of the HTML macro (I don't know if it's possible
right now, but it would be nice to be able to add a wiki macro, HTML in
this case, to the list of wiki macros that require Script right in order to
be executed)
(2) add support for "cleaning" the JavaScript code from the output produced
by the HTML macro (enabled with a parameter)
(3) modify the HTML macro to require Script right when JavaScript code is
detected

Unfortunately none is implemented yet, afaik.

On Fri, Apr 15, 2016 at 11:56 PM, Andrew Kuang  wrote:

> Hi,
>
> I wanted to assess how difficult it might be to disable all javascript
> execution in HTML macros on XWiki. My main concern would be to avoid
> breaking any important XWiki pages that utilize javascript within the HTML
> macro (as referenced here:
> http://lists.xwiki.org/pipermail/users/2009-June/012226.html). Is there
> any
> XWiki functionality that is still dependent on executing javascript via
> {{html}}?
>
> I also noticed in the comments on this JIRA issue
> (
> https://jira.xwiki.org/browse/XRENDERING-27?jql=text%20~%20%22html%20macro%20script%22
> ),
> Vincent Massol mentioned that wiki macros 2.0 will be designed in such a
> way
> that we can override the HTML macro and filter out javascript usages. I was
> wondering if this was still the best solution to disabling future javscript
> usage within {{html}}. Thank you!
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Disabling-javascript-in-HTML-macro-tp7599019.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
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users