Re: [xwiki-users] Subpage permission

2015-01-08 Thread Yvan Arnaud

Hi Eduard,

thanks for the answer.
I checked once again and had a look to the exact error in the log file. 
The problem is related to a macro I had on the left column to visualise 
the hierarchy of the space. Without the macro it works great.

Here is the macro:

{{velocity}}
#set($docSpace = $doc.space)
#set($WebPreferences = WebPreferences)
#set($docPrefixedFullName = $doc.PrefixedFullName)
#panelheader($doc.space)
{{hierarchy displayvalue=name space=$docSpace checkright=true 
excludes=$docSpace.$WebPreferences openNode=$docPrefixedFullName/}}

#panelfooter()
{{/velocity}}

and the error I noticed was:
Max calling depth of 100 was exceeded in macro 'getPathToRoot'

So I'll have to work my macro to solve this problem.

Thanks again.
Yvan

Am 07.01.2015 um 17:27 schrieb Eduard Moraru:

I have just tried your usecase and it works without any issue. Feel free to
try it out yourself on a clean XWiki instance.

Please double check your rights and that the user you are testing with is
not denied from another group he might be member of.

Thanks,
Eduard

On Wed, Jan 7, 2015 at 2:58 PM, Yvan Arnaud arn...@smaract.de wrote:


Hi,

Sorry for the misunderstanding. I meant child page when I wrote subpage.

So I'll try to be more precise:
I set specific rights on the space A: only group A has read/write
permission.
I create a page P1 in space A without parent and set specific right on
that page: group B has read permission
It works as expected: group A has read/write permissions and group B has
read permission on page P1.
If I create a page P2 as a child from Webhome page and set the read
permission to group B on that page then group B has no right to read the
page.

I forgot to specify that I'm working with XWiki 6.3.

Thanks
Yvan

Am 07.01.2015 um 13:39 schrieb Eduard Moraru:

  Hi,

XWiki has no notion of subpages. All the pages inside a space are at the
same level.

If you are using a parent-child relationship between 2 pages, it has no
impact on rights, i.e. the rights of the parent page are not inherited to
the child page. This only works on a page-space relationship, i.e. the
pages of a space inherit the rights of the space.

So if you have 2 pages P1 and P2 inside space A and you set the same
rights
on both P1 and P2, but P1 is the parent of P2, the rights work only on P1,
but not on P2? Is this what you are describing?

Thanks,
Eduard

On Wed, Jan 7, 2015 at 1:19 PM, Yvan Arnaud arn...@smaract.de wrote:

  Hi,

I've started working with XWiki for a short time and I'm facing a probem
with the rights management.
I configured XWiki so every registered users have read permission as
default.
Then I created some private spaces with read access for a specific group
of users. Let's say group A has read permission on space A.
Other groups don't have access to this space A. So it is fine.
But I need sometimes to allow some specific groups or users to access
some
specific pages in this space. For example, group B should have read
access
on page 1 of space A.
I modified the access rights of the page accordingly. The problem is: it
doesn't work when the page is a subpage. It is working fine if the page
is
at the root of the space.
Is it a normal behaviour? What shall I do to make this work?

Thanks.

Yvan Arnaud

___
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





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


Re: [xwiki-users] Howto include a link to a page in edit mode+inline mode

2015-01-08 Thread Pascal BASTIEN

  
 Anyway, it is strange than this URL below working well except for inline 
 mode: [[Panels.TagCloud||queryString=xpage=editeditor=wiki]] open directly 
 the target in edit mode and wiki editor
 [[Panels.TagCloud||queryString=xpage=editeditor=wysiwyg]]
 [[Panels.TagCloud||queryString=xpage=editeditor=rights]]
 [[Panels.TagCloud||queryString=xpage=editeditor=object]]
 [[Panels.TagCloud||queryString=xpage=editeditor=class]] 

  These will generate a URL with the “view” action!
Yes and ... no: the generated URL contain view but xpage parameter make it 
edit action.(Perhaps it is an old functionality who doesn't work with inline 
because it didn't exist?)
  For example: http://.../xwiki/bin/view/Space/Page

  And not an edit action as in: http://.../xwiki/bin/edit/Space/Page

For example: http://.../xwiki/bin/view/Space/Page?xpage=editeditor=wiki open 
directly the target in edit mode and wiki editor (even if URL contain view 
action)... like Angelo said in XWiki- Users - Link to page in edit mode without 
using full url?
  


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


Re: [xwiki-users] Where's the right parseInt?

2015-01-08 Thread Bryn Jeffries
Thanks. Can you provide a link to that entry?

Cheers,

Bryn

- Reply message -
From: vinc...@massol.net vinc...@massol.net
To: XWiki Users users@xwiki.org
Cc: Bryn Jeffries bryn.jeffr...@sydney.edu.au
Subject: [xwiki-users] Where's the right parseInt?
Date: Thu, Jan 8, 2015 19:09

Hi,

The javadoc says:

/**
 * Convert a {@code String} to a primitive {@code int}.
 *
 * @param str the String to convert to an integer
 * @return the parsed integer or zero if the string is not a valid integer 
number
 * @since 1.3 Milestone 2
 * @deprecated use {@code $mathtool.toInteger($string)}
 * ({@link 
org.apache.velocity.tools.generic.MathTool#toInteger(java.lang.Object)})
 */
@Deprecated
public int Util.parseInt(String str)

Hope it helps,
-Vincent


On 8 Jan 2015 at 06:49:23, Bryn Jeffries 
(bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:

 I've recycled some code from the tutorials and snippets in my own code, and 
 in particular I've used the following in some velocity scripts:
 #set($offset = $util.parseInt($request.get('offset')))

 which yields the following warning in the log:
 WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of method 
 [com.xpn.xwiki.api.Util.parseInt] in 40:xwiki:DemoSpace.DemoPage@4,29

 I notice in 
 http://www.xwiki.org/xwiki/bin/view/FAQ/WhyDoIHaveDeprecatedUsageOfMethodXXXInTheConsoleLog
  that a very similar warning is mentioned, but in the answer the 
 recomendation is to switch from $xwiki.parseInt to $util.parseInt. But it 
 looks like this has also been deprecated. So what should we be using instead?

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


Re: [xwiki-users] Where's the right parseInt?

2015-01-08 Thread vinc...@massol.net


On 8 Jan 2015 at 10:06:11, Bryn Jeffries 
(bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:

 Thanks. Can you provide a link to that entry? 

https://github.com/xwiki/xwiki-platform/blob/4f92c9fc4dc9d4bb7b42a54f3e289f42e833d986/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/aspect/com/xpn/xwiki/api/UtilCompatibilityAspect.aj#L202

-Vincent

 Cheers, 
  
 Bryn  
 - Reply message -
 From: vinc...@massol.net  
 To: XWiki Users  
 Cc: Bryn Jeffries  
 Subject: [xwiki-users] Where's the right parseInt?
 Date: Thu, Jan 8, 2015 19:09  
 Hi,  
  
 The javadoc says:  
  
 /**  
 * Convert a {@code String} to a primitive {@code int}.
 *
 * @param str the String to convert to an integer
 * @return the parsed integer or zero if the string is not a valid integer 
 number
 * @since 1.3 Milestone 2
 * @deprecated use {@code $mathtool.toInteger($string)}
 * ({@link 
 org.apache.velocity.tools.generic.MathTool#toInteger(java.lang.Object)})
 */
 @Deprecated
 public int Util.parseInt(String str)
  
 Hope it helps,  
 -Vincent
  
  
  
 On 8 Jan 2015 at 06:49:23, Bryn Jeffries 
 (bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:
  
  I've recycled some code from the tutorials and snippets in my own code, and 
  in particular I've used the following in some velocity scripts:
  #set($offset = $util.parseInt($request.get('offset')))
 
  which yields the following warning in the log:
  WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of method 
  [com.xpn.xwiki.api.Util.parseInt] in 40:xwiki:DemoSpace.DemoPage@4,29
 
  I notice in 
  http://www.xwiki.org/xwiki/bin/view/FAQ/WhyDoIHaveDeprecatedUsageOfMethodXXXInTheConsoleLog
   that a very similar warning is mentioned, but in the answer the 
  recomendation is to switch from $xwiki.parseInt to $util.parseInt. But it 
  looks like this has also been deprecated. So what should we be using 
  instead?
  

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


Re: [xwiki-users] Where's the right parseInt?

2015-01-08 Thread vinc...@massol.net
Hi,

The javadoc says:

    /**
     * Convert a {@code String} to a primitive {@code int}.
     *
     * @param str the String to convert to an integer
     * @return the parsed integer or zero if the string is not a valid integer 
number
     * @since 1.3 Milestone 2
     * @deprecated use {@code $mathtool.toInteger($string)}
     *             ({@link 
org.apache.velocity.tools.generic.MathTool#toInteger(java.lang.Object)})
     */
    @Deprecated
    public int Util.parseInt(String str)

Hope it helps,
-Vincent


On 8 Jan 2015 at 06:49:23, Bryn Jeffries 
(bryn.jeffr...@sydney.edu.au(mailto:bryn.jeffr...@sydney.edu.au)) wrote:

 I've recycled some code from the tutorials and snippets in my own code, and 
 in particular I've used the following in some velocity scripts:
 #set($offset = $util.parseInt($request.get('offset')))
  
 which yields the following warning in the log:
 WARN o.x.v.i.DefaultVelocityEngine - Deprecated usage of method 
 [com.xpn.xwiki.api.Util.parseInt] in 40:xwiki:DemoSpace.DemoPage@4,29
  
 I notice in 
 http://www.xwiki.org/xwiki/bin/view/FAQ/WhyDoIHaveDeprecatedUsageOfMethodXXXInTheConsoleLog
  that a very similar warning is mentioned, but in the answer the 
 recomendation is to switch from $xwiki.parseInt to $util.parseInt. But it 
 looks like this has also been deprecated. So what should we be using instead?

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


[xwiki-users] Setting up SVN Application

2015-01-08 Thread Bryn Jeffries
Having installed the SVN Application from the extension manager and copying the 
attached jars into /usr/lib/xwiki/WEB-INF/lib/ I think I've almost got the tool 
running. However, I still get the following error when I try to list pages to 
be committed:

org.tmatesoft.svn.core.SVNException: svn: Cannot create directory 
'/usr/share/tomcat7/.subversion/auth/svn.simple'

Is there a configuration step that I've missed?

Thanks,

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


Re: [xwiki-users] Manipulate presentation of LiveTable column data

2015-01-08 Thread Clemens Klein-Robbenhaar
On 01/08/2015 03:15 AM, Bryn Jeffries wrote:
 I have a custom groovy script at DemoSpace.StudiesJSON that generates JSON of 
 the form:
 {
 totalrows: 5,
 matchingtags: {},
 tags : [],
 offset: 1,
 reqNo: 0,
 returnedrows: 1,
 rows: [{doc_viewable:true,study_id:3,study_name:My 
 Study,description:A test study}]
 }
 
 This is then called from a LiveTable macro as
 {{velocity}}
 #set($columns = [study_name, description, study_id])
 #set($options = {
   resultPage:DemoSpace.StudiesJSON
 })
 #set($columnsProperties = {
   study_name : { type : text, displayName: Study Name, 
 filterable: false },
   description : { type : text, displayName: Description, 
 filterable: false },
   study_id : { type : text, displayName: Study ID, filterable: 
 false }
 })
 #livetable(studyTable $columns $columnsProperties $options)
 {{/velocity}}
 
 What I'd really like is to put links into each row, for instance replacing 
 each entry in the first (Study Name) column with a link of the form 
 [[${study_name}StudyDetails?study_id=${study_id}]]. Is there a way to do 
 this? I've tried generating a link in the JSON but the query strings seem to 
 get corrupted and the link is lost in any case within the actual LiveTable.
 


I think you can do the following here:

- change the JSON script generating the results so that study_name contains 
the HTML you want, like:

   rows: [{doc_viewable:true,study_id:3,study_name:a 
href=\/xwiki/bin/view/StudySpace/StudyDetails?study_id=3\My 
Study/a,description:A test study}]

- then set the columnsProperty for study_name to html:
   #set($columnsProperties = {
 study_name : { type : html, ...

For a list of accepted options see here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParameter24columnsProperties


Alternatively you could add your own LiveTableRow renderer in JavaScript, as 
explained in the All Attachments example on the same page:
   
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HAllAttachments

However this is a all or nothing solution - you will need to render all 
columns in the JavaScript, not only the ones you want to customize.
I would only use this solution if the first option is not sufficient for some 
reason.

Cheers
Clemens

 Thanks,
 
 Bryn
 ___
 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] Manipulate presentation of LiveTable column data

2015-01-08 Thread Marius Dumitru Florea
See 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParameter24columnsProperties
. There is a 'link' parameter. I've updated the documentation.

Hope this helps,
Marius

On Thu, Jan 8, 2015 at 4:15 AM, Bryn Jeffries
bryn.jeffr...@sydney.edu.au wrote:
 I have a custom groovy script at DemoSpace.StudiesJSON that generates JSON of 
 the form:
 {
 totalrows: 5,
 matchingtags: {},
 tags : [],
 offset: 1,
 reqNo: 0,
 returnedrows: 1,
 rows: [{doc_viewable:true,study_id:3,study_name:My 
 Study,description:A test study}]
 }

 This is then called from a LiveTable macro as
 {{velocity}}
 #set($columns = [study_name, description, study_id])
 #set($options = {
   resultPage:DemoSpace.StudiesJSON
 })
 #set($columnsProperties = {
   study_name : { type : text, displayName: Study Name, 
 filterable: false },
   description : { type : text, displayName: Description, 
 filterable: false },
   study_id : { type : text, displayName: Study ID, filterable: 
 false }
 })
 #livetable(studyTable $columns $columnsProperties $options)
 {{/velocity}}

 What I'd really like is to put links into each row, for instance replacing 
 each entry in the first (Study Name) column with a link of the form 
 [[${study_name}StudyDetails?study_id=${study_id}]]. Is there a way to do 
 this? I've tried generating a link in the JSON but the query strings seem to 
 get corrupted and the link is lost in any case within the actual LiveTable.

 Thanks,

 Bryn
 ___
 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] Manipulate presentation of LiveTable column data

2015-01-08 Thread Bryn Jeffries
Many thanks - the first option works fine for me.
- Reply message -
From: Clemens Klein-Robbenhaar c.robbenh...@espresto.com
To: users@xwiki.org
Subject: Re: [xwiki-users] Manipulate presentation of LiveTable column data
Date: Thu, Jan 8, 2015 21:23


On 01/08/2015 03:15 AM, Bryn Jeffries wrote:
 I have a custom groovy script at DemoSpace.StudiesJSON that generates JSON of 
 the form:
 {
 totalrows: 5,
 matchingtags: {},
 tags : [],
 offset: 1,
 reqNo: 0,
 returnedrows: 1,
 rows: [{doc_viewable:true,study_id:3,study_name:My 
 Study,description:A test study}]
 }

 This is then called from a LiveTable macro as
 {{velocity}}
 #set($columns = [study_name, description, study_id])
 #set($options = {
   resultPage:DemoSpace.StudiesJSON
 })
 #set($columnsProperties = {
   study_name : { type : text, displayName: Study Name, 
 filterable: false },
   description : { type : text, displayName: Description, 
 filterable: false },
   study_id : { type : text, displayName: Study ID, filterable: 
 false }
 })
 #livetable(studyTable $columns $columnsProperties $options)
 {{/velocity}}

 What I'd really like is to put links into each row, for instance replacing 
 each entry in the first (Study Name) column with a link of the form 
 [[${study_name}StudyDetails?study_id=${study_id}]]. Is there a way to do 
 this? I've tried generating a link in the JSON but the query strings seem to 
 get corrupted and the link is lost in any case within the actual LiveTable.



I think you can do the following here:

- change the JSON script generating the results so that study_name contains 
the HTML you want, like:

   rows: [{doc_viewable:true,study_id:3,study_name:a 
href=\/xwiki/bin/view/StudySpace/StudyDetails?study_id=3\My 
Study/a,description:A test study}]

- then set the columnsProperty for study_name to html:
   #set($columnsProperties = {
 study_name : { type : html, ...

For a list of accepted options see here:
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParameter24columnsProperties


Alternatively you could add your own LiveTableRow renderer in JavaScript, as 
explained in the All Attachments example on the same page:
   
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HAllAttachments

However this is a all or nothing solution - you will need to render all 
columns in the JavaScript, not only the ones you want to customize.
I would only use this solution if the first option is not sufficient for some 
reason.

Cheers
Clemens

 Thanks,

 Bryn
 ___
 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] prevent page save

2015-01-08 Thread Jason Clemons
Hello all, 

I've implemented some client side page validation using JavaScript which works 
well, but I want to implement some simple checks on server side also.  I know 
how to evaluate the values in my UI using velocity after the page is submitted, 
but how do I prevent the page from saving if my criteria isn't met?
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] Add Content my html form

2015-01-08 Thread Matthias Wegner
Hi,

i want to add some content to a page by a form. I want a grownig buttet list
below. Is there a other way than over the XDOM?



Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Add-Content-my-html-form-tp7593609.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] Run Macro inside velocity

2015-01-08 Thread Matthias Wegner
Hi All,

i just uploaded a new extension to
http://extensions.xwiki.org/xwiki/bin/view/Extension/TaskMacro.

I want to enable in inside


Can i do that?

Regards,
Matthias



--
View this message in context: 
http://xwiki.475771.n2.nabble.com/Run-Macro-inside-velocity-tp7593608.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