[xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Meng Wu
Hi,

Why are programming rights needed to view the "Copy" Link? According to the 
user guide, Programming rights are described as privileges to "use protected 
APIs & Groovy code in wiki pages". I read the JIRA at 
http://jira.xwiki.org/jira/browse/XE-374 and it seems that originally, users 
without PR weren't able to copy pages even though the copy link was showed, so 
the non-viewable feature was added as a fix.

What I don't understand is how copying action relates to using protected APIs 
and groovy code at all, or in other words, why the last editor of the page must 
have programming rights in order for the Copy Action to show up for anyone.

Thanks

Felix


  

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


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Sergiu Dumitriu
On 03/04/2010 09:54 PM, Meng Wu wrote:
> Hi,
>
> Why are programming rights needed to view the "Copy" Link? According
> to the user guide, Programming rights are described as privileges to
> "use protected APIs&  Groovy code in wiki pages". I read the JIRA at
> http://jira.xwiki.org/jira/browse/XE-374 and it seems that
> originally, users without PR weren't able to copy pages even though
> the copy link was showed, so the non-viewable feature was added as a
> fix.
>
> What I don't understand is how copying action relates to using
> protected APIs and groovy code at all, or in other words, why the
> last editor of the page must have programming rights in order for the
> Copy Action to show up for anyone.
>

That's just a bug, Copy should work without programming rights.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-04 Thread Meng Wu
Thanks Sergiu. Is there a jira bug number I can follow when the bug gets fixed?

Thanks,

Felix



- Original Message 
From: Sergiu Dumitriu 
To: XWiki Users 
Sent: Thu, March 4, 2010 4:05:36 PM
Subject: Re: [xwiki-users] Programming rights needed for Copy Action

On 03/04/2010 09:54 PM, Meng Wu wrote:
> Hi,
>
> Why are programming rights needed to view the "Copy" Link? According
> to the user guide, Programming rights are described as privileges to
> "use protected APIs&  Groovy code in wiki pages". I read the JIRA at
> http://jira.xwiki.org/jira/browse/XE-374 and it seems that
> originally, users without PR weren't able to copy pages even though
> the copy link was showed, so the non-viewable feature was added as a
> fix.
>
> What I don't understand is how copying action relates to using
> protected APIs and groovy code at all, or in other words, why the
> last editor of the page must have programming rights in order for the
> Copy Action to show up for anyone.
>

That's just a bug, Copy should work without programming rights.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
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] Programming rights needed for Copy Action

2010-03-04 Thread Sergiu Dumitriu
On 03/04/2010 11:25 PM, Meng Wu wrote:
> Thanks Sergiu. Is there a jira bug number I can follow when the bug gets 
> fixed?

Yes, http://jira.xwiki.org/jira/browse/XWIKI-3961

>
> - Original Message 
> From: Sergiu Dumitriu
> To: XWiki Users
> Sent: Thu, March 4, 2010 4:05:36 PM
> Subject: Re: [xwiki-users] Programming rights needed for Copy Action
>
> On 03/04/2010 09:54 PM, Meng Wu wrote:
>> Hi,
>>
>> Why are programming rights needed to view the "Copy" Link? According
>> to the user guide, Programming rights are described as privileges to
>> "use protected APIs&   Groovy code in wiki pages". I read the JIRA at
>> http://jira.xwiki.org/jira/browse/XE-374 and it seems that
>> originally, users without PR weren't able to copy pages even though
>> the copy link was showed, so the non-viewable feature was added as a
>> fix.
>>
>> What I don't understand is how copying action relates to using
>> protected APIs and groovy code at all, or in other words, why the
>> last editor of the page must have programming rights in order for the
>> Copy Action to show up for anyone.
>>
>
> That's just a bug, Copy should work without programming rights.
>

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-05 Thread raphaelle

Waiting the correction of the bug you can correct it now by modifying the
file contentmenu.vm of the template you use, you look for the word "copy",
you'll find:

#if( $xwiki.hasProgrammingRights())
#submenuitem($doc.getURL('view', 'xpage=copy') $msg.get('core.menu.copy')
'tmActionCopy', '')
#end

and you delete the lines before and after that prevent it to be displayed
you must get:
#submenuitem($doc.getURL('view', 'xpage=copy') $msg.get('core.menu.copy')
'tmActionCopy', '')

so that every user has access to the copy.
-- 
View this message in context: 
http://n2.nabble.com/Programming-rights-needed-for-Copy-Action-tp4677178p4679599.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] Programming rights needed for Copy Action

2010-03-05 Thread Vincent Massol
Hi Raphaelle,

On Mar 5, 2010, at 9:18 AM, raphaelle wrote:

> 
> Waiting the correction of the bug you can correct it now by modifying the
> file contentmenu.vm of the template you use, you look for the word "copy",
> you'll find:
> 
> #if( $xwiki.hasProgrammingRights())
> #submenuitem($doc.getURL('view', 'xpage=copy') $msg.get('core.menu.copy')
> 'tmActionCopy', '')
> #end
> 
> and you delete the lines before and after that prevent it to be displayed
> you must get:
> #submenuitem($doc.getURL('view', 'xpage=copy') $msg.get('core.menu.copy')
> 'tmActionCopy', '')
> 
> so that every user has access to the copy.

That won't work. The reason for these lines is because the copy code thereafter 
requires programming rights (PR) so this code is just to ensure that users with 
no PR don't see the copy action menu since it would fail.

-Vincent

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


Re: [xwiki-users] Programming rights needed for Copy Action

2010-03-05 Thread raphaelle

indeed just realized it...
I tried to cheat and modify the rights on the page "Copy a document" to link
on her, so that all my users could copy, but it doesn't work...
there is'nt a way to bypass the rights with some Velocity code put in the
right place?
-- 
View this message in context: 
http://n2.nabble.com/Programming-rights-needed-for-Copy-Action-tp4677178p4679753.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