Re: [xwiki-users] How to avoid nested space?

2016-04-28 Thread KirbY ZhoU
Sorry for trouble again, I have upgrade to 7.4.3 now.
But I still cannot see "limit" option in "Add Gadget" dialog / "Page Tree" 
macro.
How can I add the option into this dialog?




在 16/1/6 下午2:08,“users 代表 Marius Dumitru Florea” 写入:

>On Tue, Jan 5, 2016 at 4:45 PM, Zhou Tianling  wrote:
>
>> I have tried this below on 7.3-release.
>> {{documentTree compact="true" showTranslations="false"
>> showAttachments="false" root="wiki:xwiki" limit="200" /}}
>> But “limit” do not works.
>>
>
>Indeed, I just tested on 7.3, but you can quickly fix it by editing the
>XWiki.DocumentTreeConfig page with the wiki editor and replace
>
>  'showRoot': false
>
>with
>
>  'showRoot': false,
>  'limit': 15
>
>(i.e. declare de 'limit' configuration parameter and its default value)
>
>Hope this helps,
>Marius
>
>
>>
>>
>>
>> 在 16/1/5 下午9:35,“users 代表 Marius Dumitru Florea”> 代表 mariusdumitru.flo...@xwiki.com> 写入:
>>
>> >On Tue, Jan 5, 2016 at 3:33 PM, vinc...@massol.net 
>> >wrote:
>> >
>> >>
>> >>
>> >> On 5 Jan 2016 at 14:29:11, Marius Dumitru Florea (
>> >> mariusdumitru.flo...@xwiki.com(mailto:mariusdumitru.flo...@xwiki.com))
>> >> wrote:
>> >>
>> >> > On Tue, Jan 5, 2016 at 2:35 PM, vinc...@massol.net
>> >> > wrote:
>> >> >
>> >> > > Hi,
>> >> > >
>> >> > > On 5 Jan 2016 at 10:09:27, KirbY ZhoU (kirbyz...@gmail.com(mailto:
>> >> > > kirbyz...@gmail.com)) wrote:
>> >> > >
>> >> > > > Sorry for reply so later, I have taken a vacation for days.
>> >> > >
>> >> > > Hope you had some nice holidays! :)
>> >> > >
>> >> > > > Actually, I modified Dashboard.WebHome after upgrade, and use
>> >> {{spaces}}
>> >> > > macro which comes from 7.3 release.
>> >> > > > Now I replace {{spaces}} with {{documentTree}}, but I have some
>> >> little
>> >> > > problem.
>> >> > > > 1. I want to avoid "xxx more", but limit=100 do not work.
>> >> > > > 2. I want to limit the tree level, but I have no idea.
>> >> > >
>> >> > > All documentation for the tree macro can be found at
>> >> > >
>> >>
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/Document+Tree+Macro
>> >> > >
>> >> > >
>> >> >
>> >> > > AFAIK there’s currently no way to configure how many items to
>> display
>> >> > > before “xxx more” appears. @Marius: is that correct? It seems it
>> would
>> >> be
>> >> > > useful to have this in the future if that’s the case. WDYT? Do we
>> have
>> >> a
>> >> > > jira issue about it already?
>> >> > >
>> >> >
>> >> > There is an internal "limit" parameter available since 7.3RC1, as I
>> >> > mentioned on
>> >> > http://lists.xwiki.org/pipermail/users/2015-December/031746.html . It
>> >> > doesn't appear in the documentation because I haven't made it public
>> yet
>> >> > (with a XWiki.WikiMacroParameterClass object) but it can be used.
>> >> >
>> >> > {{documentTree limit="3" /}}
>> >>
>> >>
>> >
>> >> ok thanks I had forgotten. However KirbY mentioned that it didn’t work
>> >> when he tried it.
>> >>
>> >
>> >I just tried on 8.0-SNAPSHOT and it woks for me.
>> >
>> >
>> >>
>> >> @KirbY: have you used it in the way Marius described above?
>> >>
>> >> Thanks
>> >> -Vincent
>> >>
>> >> > > I’m not sure what’s your use case for point 2. I guess you mean
>> limit
>> >> the
>> >> > > hierarchy but it seems it would prevent users from navigating
>> >> correctly so
>> >> > > I’m not sure what’s the use case.
>> >> > >
>> >> > > Thanks
>> >> > > -Vincent
>> >> > >
>> >> > > > 发件人: Vincent Massol 代表 "vinc...@massol.net(mailto:
>> vinc...@massol.net
>> >> )"
>> >> > > > 日期: 2015年12月23日 星期三 下午7:35
>> >> > > > 至: KirbY ZhoU , XWiki Users
>> >> > > > 主题: Re: [xwiki-users] How to avoid nested space?
>> >> > > >
>> >> > > > Hi,
>> >> > > >
>> >> > > > The default dashboard is located in Dashboard.WebHome. When you
>> >> upgraded
>> >> > > you should have had the Distribution Wizard upgrade that page. Was
>> >> that the
>> >> > > case? Could you check the history for that page?
>> >> > > >
>> >> > > > Now two things could have happened:
>> >> > > >
>> >> > > > 1) you overwrote the changes brought by the Distribution Wizard by
>> >> > > importing old versions of pages from your previous wiki. If you’ve
>> done
>> >> > > that then you’ve most likely broken the upgrade process since you’ve
>> >> > > removed all the upgrades that were required to all default wiki
>> pages!
>> >> :)
>> >> > > See http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade for
>> >> the
>> >> > > canonical way of upgrading an XWiki instance. If you’ve done that I
>> >> suggest
>> >> > > that you redo the upgrade.
>> >> > > >
>> >> > > > 2) you have modified Dashboard.WebHome. If this is the case then
>> >> you’ll
>> >> > > need to update your version to use the {{documentTree}} macro
>> instead
>> >> of
>> >> > > the spaces macro.
>> >> > > >
>> >> > > > As I’ve mentioned already in my reply the notion of Spaces have
>> been
>> >> > > removed from the UI 

Re: [xwiki-users] Macro Restricted Mode

2016-04-28 Thread Jack
I want to change this value for the html macro. 

HTMLMacro code:

https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java






--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Macro-Restricted-Mode-tp7599269p7599272.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] how to cover one page title

2016-04-28 Thread Jack
the default title should be "$doc.web - $doc.name"
I hope cover one page title (as blog main page) ,I know that  Space
Preferences make a different title for each space,but I just want to cover a
page title 
I try to use velocity code In the blog.Webhome as:

{{velocity}}
$doc.setTitle("My new title")
{{/velocity}}

it's not working

Is there any other way to cover a page title without modifying the database?




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/how-to-cover-one-page-title-tp7599271.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 RESTful API HttpPut

2016-04-28 Thread Tobi
Hello, for some reason my program freezes during second/third use of my
Uploading Page method (RESTful API). How can I fix this? 

Here is my authentication method:

public void connectMethod(CloseableHttpClient client, String scheme, String
host, Integer port, String login, String password) throws
ClientProtocolException, IOException{
ConnectionThread = new Thread(new Runnable(){
public void run(){
HttpHost targetHost = new HttpHost(host, port, scheme);
CredentialsProvider credsProvider = new 
BasicCredentialsProvider();
credsProvider.setCredentials(
new AuthScope(targetHost.getHostName(), 
targetHost.getPort()),
new UsernamePasswordCredentials(login, password));
InetAddress address;
AuthCache authCache = new BasicAuthCache();
BasicScheme basicAuth = new BasicScheme();
authCache.put(targetHost, basicAuth);
HttpClientContext context = HttpClientContext.create();
context.setCredentialsProvider(credsProvider);
context.setAuthCache(authCache);
HttpGet httpget = new HttpGet("/");
//for (int i = 0; i < 3; i++) {
try{
CloseableHttpResponse response;
response = client.execute(targetHost, httpget, context);
logArea.setText("Авторизация№" + counter + " "  +
response.getStatusLine().toString());
counter++;
HttpEntity entity = response.getEntity();
response.close();
} catch (IOException e){
e.printStackTrace();
logArea.setText(e.getMessage());
}
//}
}
});
ConnectionThread.start();


}

And my Upload Method:

public void SendTestPage(CloseableHttpClient client){
UploadingThread = new Thread(new Runnable(){
public void run(){
JAXBContext context;
ObjectFactory factory = new ObjectFactory();
Page page = factory.createPage();
// Page page = new Page();
page.setName("TestPage");
//page.setTitle("TestPageTitle");
page.setContent(logArea.getText());
page.setParent("Kiss");
try {
context = 
JAXBContext.newInstance("org.xwiki.rest.model.jaxb");
Unmarshaller unmarshaller = context.createUnmarshaller();
Marshaller marshaller = context.createMarshaller();
String name = page.getName();
System.out.println(name);
name = URLEncoder.encode(name, "UTF-8");
//page.setName(name);
//page.setXwikiRelativeUrl("http://www.xwiki.org/rel/page;);
HttpPut putMethod = new HttpPut(checkAccessField.getText()); 
putMethod.addHeader("Accept", "application/xml");
putMethod.addHeader("Accept-Ranges", "bytes");
Page p = new Page();
p.setContent(page.getContent());
p.setTitle(page.getTitle());
p.setParent(page.getParent());
StringWriter writer = new StringWriter();
marshaller.marshal(page, writer);
System.out.println("WRITER = " + writer + "");
StringEntity entity = new StringEntity(writer.toString(), "UTF-8");
entity.setContentType("application/xml");
putMethod.setEntity(entity);
//putMethod.setEntity(new StringEntity("My shit", "UTF-8"));
   client.execute(putMethod);
} catch (IOException e){
e.printStackTrace();
logArea.setText(e.getMessage());
}
finally {
return;
}
}
});
UploadingThread.start();
}



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/xWiki-RESTful-API-HttpPut-tp7599270.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] Macro Restricted Mode

2016-04-28 Thread Wei He
This article mentions that Macro Transformation Context can be set in
"Restricted Mode" and TransformationContext class constructor takes this
parameter. But I can't find where this value is originally set. Does it come
from configuration? I want to change this value for the html macro. 

http://rendering.xwiki.org/xwiki/bin/view/Main/ExtendingMacro

Thanks, 



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Macro-Restricted-Mode-tp7599269.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] Rights inheritance doubt in v7.4

2016-04-28 Thread Iago Lluque

Hi,

Much better! Thanks!

ASOL Email Un cordial saludo,
Iago Lluque
/
*Alínea Software Solutions S.L.*
Travesía del Comercio 3, 2º 36002 Pontevedra España
Tel: +34 986 845 699
Email: i...@alineasol.com 
Web: http://www.alineasol.com
/
El 27/04/2016 a las 18:13, Vincent Massol escribió:

Hi,

We’re still updating the doc but a draft version exists at:
- Use guide: http://dev.xwiki.org/xwiki/bin/view/Drafts/Rights+Management
- Admin guide: http://dev.xwiki.org/xwiki/bin/view/Drafts/AccessRights

Let us know if this new version is better!

Thanks
-Vincent


On 27 Apr 2016, at 18:08, Guillaume Lerouge  wrote:

Hi Iago,

indeed, the documentation is slightly wrong on this. Rights applied
downstream take precedence over rights applied upstream, so you also need
to give GroupA edit rights on the page.

One exception to this is the admin right, which keeps applying downstream
in all circumstances.

Guillaume

On Wed, Apr 27, 2016 at 2:27 PM, Iago Lluque 
wrote:


Hi all,

I have doubts about how permissions are inherited in XWiki v7.4. Does this
statement from your documentation still apply for this version?
/"*Note on permission inheritance*//
//When a permission is explicitly set for a given group or user at a
certain scope (page, space or wiki) then other groups and users must also
have the right explicitly set as well, at this scope or a scope upstream.//
//For example, when you decide to explicitly allow the view right for
"GroupA" on a given space, users that are not members of "GroupA" must have
the view right explicitly set either on the given space or on the whole
wiki to be able to view the space as well."/

I expose my problem:
GroupA with edit rights at Wiki level.
GroupB with view rights at Wiki level.
I grant GroupB edit permissions on a certain page => GroupA is no longer
able to edit this page (neither its children) until I specifically grant
them edit rights (again, as at Wiki level they have them). This contradicts
previous statement.

Could you please clarify? Thanks in advance!

--
ASOL Email Un cordial saludo,
Iago Lluque
/
*Alínea Software Solutions S.L.*
Travesía del Comercio 3, 2º 36002 Pontevedra España
Tel: +34 986 845 699
Email: i...@alineasol.com 
Web: http://www.alineasol.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

___
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] Admin Rights on myxwiki.org

2016-04-28 Thread Ldm Public
Hi,

Thanks for your action.

I have tested the search but it works partialy, for instance it returns no
result on some words which are "in Wiki pages" like "Android".

Ok for the PR restriction on myxwiki.org. But does it means I need to post
a request in user mailing lsit to fix it each time the Wiki is updated (new
version installed with the wizard yesterday)?

Regards,

2016-04-28 9:01 GMT+02:00 Vincent Massol :

> Hi Ldm,
>
> > On 27 Apr 2016, at 23:25, Ldm Public  wrote:
> >
> > Hi,
> >
> > I run the Wiki http://tutos.myxwiki.org on the community farm and
> search crashed with "Solr query require programming right" error ... does
> someone can save the required pages with the correct rights ? or better
> solution can give me "programming rights”?
>
> I’ve fixed it. Try to not edit Main.Search.
>
> Unfortunately I cannot give your PR on your wiki since this means giving
> your PR at the farm level and we don’t allow this on myxwiki.org for
> security reasons.
>
> Thanks
> -Vincent
>
> > Regards,
>
> ___
> 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] Admin Rights on myxwiki.org

2016-04-28 Thread Vincent Massol
Hi Ldm,

> On 27 Apr 2016, at 23:25, Ldm Public  wrote:
> 
> Hi,
> 
> I run the Wiki http://tutos.myxwiki.org on the community farm and search 
> crashed with "Solr query require programming right" error ... does someone 
> can save the required pages with the correct rights ? or better solution can 
> give me "programming rights”?

I’ve fixed it. Try to not edit Main.Search.

Unfortunately I cannot give your PR on your wiki since this means giving your 
PR at the farm level and we don’t allow this on myxwiki.org for security 
reasons.

Thanks
-Vincent

> Regards,

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


Re: [xwiki-users] Filesystem porter issue (VoidAttachmentVersioningStore)

2016-04-28 Thread m...@ow2.org
Hi Caleb,

I'm not sure to understand,

As described in http://jira.xwiki.org/browse/XWIKI-13348 ,
xwiki.store.attachment.versioning.hint=file is *already* set to "file".
That's the point here.

Le 27/04/2016 09:53, Caleb James DeLisle a écrit :
> So try setting your AttachmentVersionStore in your config to "file" as per
> the recommendations. When the porter is complete you can set it back.
> 
> Thanks,
> Caleb
> 
> 
> On 26/04/16 09:01, m...@ow2.org wrote:
>> Well,
>> Having VoidAttachmentVersioningStore here just prevents the script to
>> run, this is why I'm asking for help :)
>>
>> Le 25/04/2016 12:17, Caleb James DeLisle a écrit :
>>> Hmm, I don't recall whether VoidAttachmentVersioningStore was supported
>>> but in any case you should have little difficulty if you switch
>>> attachment
>>> versioning store to file and then switch to void after making the
>>> migration.
>>>
>>> Thanks,
>>> Caleb
>>>
>>>
>>> On 25/04/16 11:47, m...@ow2.org wrote:
 Hi,

 Like described in http://jira.xwiki.org/browse/XWIKI-13348 I get a red
 line on VoidAttachmentVersioningStore.

 I have double-checked the configuration (those three lines in
 xwiki.cfg).

 Could someone give a hand ? Is it safe to run the backup script like
 this anyway ?

 PS: I've also attached a screenshot of the error in the issue

 Thanks
 ___
 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


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