Hi all,
Currently XWiki right service does not allow users that are not creators
of a document to delete it with only the "delete" right allowed on that
document, they must, to be able to actually delete it, have the "admin"
right allowed.
This is not totally clear to me if it is the behaviour we should expect,
but I would tend to say no, for two reasons :
* The delete right is a specific right entry, so it should provide what it
says : the right to delete. It is different from edit, so you can share
edition on (your) documents with your fellow co-workers, without
necessarily allowing them to delete those, and using this right entry, you
can also allow users & groups to delete documents without giving them the
"admin" right (which would allow them to program in groovy for example).
* For a document that hasn't been created by me, but on which I've got the
delete right (for example inherited from the space or wiki level), if I'm
not an admin (do not have the "admin" right) and I call
$doc.hasAccessLevel("delete"), the API will answer "true", but I won't be
able to actually delete the doc, which is misleading.
I've created a JIRA (http://jira.xwiki.org/jira/browse/XWIKI-1944) issue
for this and will provide a possible patch, please tell me what you think,
so that we can decide if indeed we can allow non-creators to delete
documents provided they have the delete right.
Thanks,
Jerome.
Hi,
In one of your tutorials (referencing FAQ application) you have shown how to
create custom classes, add properties to it and create objects of these
classes.
This was well understood and thanks for the easy to understand tutorial.
Following the steps I create a space called aeternam and added a page
SupplierClass under it.
Further I create a page "Suppliers" under aeternam space, on which I pasted
the velocity template code to create objects of the SupplierClass and view
create objects.
All works fine. Only problem is the objects are created under the parent
SupplierClass and not under parent Suppliers.
I have explicitly mentioned the parent using the code:
#set( $class = "Supplier")
#set( $defaultparent = "Suppliers")
#set( $defaultweb = "aeternam")
#set( $doc1new =
$xwiki.getDocument("${doc.space}.${class}ClassSheet").isNew())
#set( $doc2new =
$xwiki.getDocument("${doc.space}.${class}ClassTemplate").isNew())
#if (!($doc1new||$doc2new))
1.1 Create a new Supplier
To create a new supplier, you should first choose a name for your supplier.
<form action="" id="newdoc" method="post">
<div>
<input type="hidden" name="parent" value="${defaultparent}"/>
<input type="hidden" name="template"
value="${doc.web}.${class}ClassTemplate"/>
<input type="hidden" name="sheet" value="1"/>
Space: <input type="text" readonly="true" name="webname"
value="${defaultweb}" size="8"/>
Supplier: <input type="text" name="name" value="Supplier Name"/>
<br/>
<br/>
## TODO: remove this onclick
<input type="button" value="Create this supplier" onclick='if
(updateName(this.form.name)) {this.form.action="../../inline/" +
this.form.webname.value + "/" + this.form.name.value; this.form.submit();
}'/>
</div>
</form>
1.1 Existing Suppliers
#set ($sql = ", BaseObject as obj where obj.name=doc.fullName and
obj.className='${doc.web}.${class}Class' and
obj.name<>'${doc.web}.${class}ClassTemplate'")
#foreach ($item in $xwiki.searchDocuments($sql))
* [$item]
#end
#end
So what do I have to do to create objects of a class under some other parent
page not under the default class page.
Next after a document object is created I would like to update the same
document, just like in create is there a template or tutorial that would
help me in understanding how to update a object, so as to complete the CRUD
flow.
Thanks
Sachin
--
View this message in context: http://www.nabble.com/Creating-structured-objects-tp14268015p14268015.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
I'm trying to use XEclipse with https, does this work under the covers
and just not exposed in the UI?
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
We all have problems. How we deal with them is a measure of our worth.
-- Unknown
Hi everyone,
We now have a new version of the xwiki.org web site up and running on http://xwiki.org
Let us know if you find any issue.
I'd like to thank the following persons who helped:
- Laurent Lunati for the skin
- Thomas Mortagne for helping me with the migration
- Guillaume Lerouge also for helping with the migration
- Raffaello for the admin part
I really like the new site, hope you'll like it too :)
-Vincent, on behalf of the xwiki dev team
Now my objects are persistents. But i don't know how to access their
properties.
Should i create an annotation class through the XWiki class editor?
It seems that in my database, none of the properties of my annotations
are stored.
I define an annotation for a document:
$xwiki.annotation.addNewAnnotation($doc,"blablablaAnnotation",0,10,"blablaSelection","auteur")
I retrieve all annotations of a document:
#set($annots=$doc.getObjects("annotation"))
And i try to get the selection field of my annotations:
#foreach($annot in $annots)
"$annot.get("selection")"
#end
But all i have is "".
What should i do?
--
Antoine SEILLES
Doctorant (phd student)
Pikko software
Cap Omega - Rond Point Benjamin Franklin
CS 39521
34960 Montpellier Cedex 2
FRANCE
LIRMM CNRS
UMR 5506 - 161 rue Ada
34392 Montpellier Cedex 5
FRANCE
Tel: +33 (0)6 10 192 055
http://www.pikko-software.comhttp://www.lirmm.fr
My colleague and I have a Table of Contents within the Show/Hide snippet (code below) but would like the cursor to change to the pointed finger when the user rolls over the statement "Click here to show/hide Table of Contents". Any ideas? Thanks in advance. Chris
<div id="DIV ID" class="hidden">*__Table of Contents__*#toc("" "" "")</div><div onclick="toggleClass($('DIV ID'), 'hidden')">Click here to show/hide Table of Contents</div>
_________________________________________________________________
Your smile counts. The more smiles you share, the more we donate. Join in.
www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline
Hi,
As previously proposed, today (Friday 7th) is the planned day for the
second (and hopefully last) 1.2 Release Candidate. If there are no
critical bugs discovered, this release will be promoted as 1.2 next week.
Thanks,
Sergiu and my +1