On Fri, Feb 11, 2011 at 8:19 AM, Vincent Massol <vincent(a)massol.net> wrote:
On Feb 10, 2011, at 8:50 PM, jvelociter (SVN) wrote:
Author: jvelociter
Date: 2011-02-10 20:50:06 +0100 (Thu, 10 Feb 2011)
New Revision: 34616
Added:
enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
Modified:
enterprise/trunk/wiki/src/main/resources/Main/Activity.xml
enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml
enterprise/trunk/wiki/src/main/resources/XWiki/AllAttachmentsResults.xml
enterprise/trunk/wiki/src/main/resources/XWiki/DeletedAttachments.xml
enterprise/trunk/wiki/src/main/resources/XWiki/DeletedDocuments.xml
Log:
XE-831 Provide a XClass that allow to mark pages that require to be saved
by a
user with certain rights
XE-832 Add XWiki.RequiredRightClass to XE
documents that require to be
saved with certain rights
[snip]
Modified:
enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml
===================================================================
--- enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml 2011-02-10
19:49:34
UTC (rev 34615)
+++
enterprise/trunk/wiki/src/main/resources/Main/Spaces.xml 2011-02-10
19:50:06 UTC
(rev 34616)
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
[snip]
+<className>XWiki.RequiredRightClass</className>
+<guid>eb832884-79a9-4e96-b1fa-55fdbb06b0a5</guid>
+<property>
+<level>edit</level>
I don't understand the point of settings RequiredRightClass with level =
edit. Editing a page always requires edit rights anyway, no?
(I'm sure I'm missing something though...)
:)
RequiredRightClass correspond to the minimal access level the last author
("contentAuthor" to be precise) must have on the document for it to behave
properly.
It's just the same paradigm as what we call the programming right. In this
case, right refers to the document's right, not the people right (even if
the author's right is evaluated to determine the document right).
Wiki macro documents with scope "current wiki" are not registered by the
macro manager if the last author (contentAuthor) does not have edit right on
the document. I don't remember exactly why we have taken this approach, but
that's how it is today. This is why RequiredRightClass with level "edit"
make sense in this situation.
Note: Wiki/TagCloud.xml also has an "edit"
level
Added:
enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
===================================================================
--- enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
(rev 0)
+++
enterprise/trunk/wiki/src/main/resources/XWiki/RequiredRightClass.xml
2011-02-10 19:50:06 UTC (rev 34616)
Hmm do we consider the RequiredRightClass a "core" class or not? If so I
think we should create it programmatically if it doesn't exist in the wiki
at startup.
I don't know if it is a core class, really.
Right now not having the RequiredRightClass defined in the wiki does not
prevent the system from functioning, since it is just a marker.
The day we also refuse PR right to documents not declaring it with a
RequiredRightClass, maybe it would become more "core".
WDYT ?
Jerome.
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs