Re: [xwiki-users] programming rights in class sheet

2012-02-07 Thread O Voss
And once again thanks, Sergiu!


- Ursprüngliche Message -
 Von: Sergiu Dumitriu ser...@xwiki.com
 An: XWiki Users users@xwiki.org
 Cc: 
 Gesendet: 7:28 Sonntag, 5.Februar 2012
 Betreff: Re: [xwiki-users] programming rights in class sheet
 
 On 02/04/2012 06:22 AM, O Voss wrote:
  Hi,
 
  In documents based on a certain class I need to list the attachments of the 
 document. I used the 'List attachments of a page'-snippet from 
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
 class sheet. This works perfectly fine as long as the document is saved by a 
 user with programming rights. When saved by a normal user it doesn't work, 
 as the priviledged API is used. Is there some workaround or solution for this?
 
 For that there's a simple API:
 
 #foreach ($attachment in $doc.attachmentList)
 * $attachment.filename
 #end
 
 -- 
 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 in class sheet

2012-02-06 Thread Marius Dumitru Florea
On Sat, Feb 4, 2012 at 1:22 PM, O Voss richyfourtyth...@yahoo.com wrote:
 Hi,

 In documents based on a certain class I need to list the attachments of the 
 document. I used the 'List attachments of a page'-snippet from 
 http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
 class sheet. This works perfectly fine as long as the document is saved by a 
 user with programming rights. When saved by a normal user it doesn't work, as 
 the priviledged API is used. Is there some workaround or solution for this?

Are you using the new sheet system? See
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module#HSheetsandprogrammingrights
.

Hope this helps,
Marius


 Thanks

 Olaf

 ___
 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] programming rights in class sheet

2012-02-04 Thread O Voss
Hi,

In documents based on a certain class I need to list the attachments of the 
document. I used the 'List attachments of a page'-snippet from 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
class sheet. This works perfectly fine as long as the document is saved by a 
user with programming rights. When saved by a normal user it doesn't work, as 
the priviledged API is used. Is there some workaround or solution for this?

Thanks

Olaf

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


Re: [xwiki-users] programming rights in class sheet

2012-02-04 Thread Sergiu Dumitriu

On 02/04/2012 06:22 AM, O Voss wrote:

Hi,

In documents based on a certain class I need to list the attachments of the 
document. I used the 'List attachments of a page'-snippet from 
http://platform.xwiki.org/xwiki/bin/view/DevGuide/velocityHqlExamples in the 
class sheet. This works perfectly fine as long as the document is saved by a 
user with programming rights. When saved by a normal user it doesn't work, as 
the priviledged API is used. Is there some workaround or solution for this?


For that there's a simple API:

#foreach ($attachment in $doc.attachmentList)
* $attachment.filename
#end

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