I would like to modify navigation panel to list only spaces for wich a
user has at least the view access level.
How to test the access Level of a user for a space?
How to get the current user?
Thank for your time.
Hi devs,
I would like to release XE 1.6.2 before closing the 1.6 branch (since
1.7 final is released) and XEM 1.4.1 based on it next Monday (because
I don't have time to do a release this week).
WDYT ?
Here is my +1
--
Thomas Mortagne
Hi, devs.
I have a small review of XWIKI-1090: XWiki Query Generator,
XWikiQuery/makeQuery
in order to move it to new XWQLanguage instead of old QueryPlugin.
>This features allows to generate a Query UI and the corresponding
query automatically to run on the storage engine.
>The displaySearch APIs allow to display the query UI and makeQuery
allow to generate the query
It is easy to rewrite syntax to XWQL, but there are some problems in design.
1. To make it run on XWQL we just need to replace QueryPlugin#makeQuery
with something similar.
I propose:
1.1 move XWikiCriteria to xwiki-query/manager module
(it is not depend on core. except only one util method)
1.2 add
Query QueryManager#createQuery(XWikiCriteria)
as analogue to QueryPlugin#makeQuery
1.3 fix all affected references.
There are one method that need be bridged (xwiki-bridge) for this:
BaseClass#makeQuery.
I don't like to bridge it, so looking other ways.
2. General overview of query generator:
It is very connected with core and distributed across many classes. This
is not good for our component architecture.
There are:
UI Generator:
XWiki#displaySearch*
PropertyClass#displaySearch* and overrides
XWikiDocument#displaySearch
Query Generator:
XWiki#createQueryFromRequest
BaseClass#makeQuery
PropertyClass#makeQuery, #fromSearchMap and overrides
Executers:
XWiki#search*(XWikiQuery, ...)
I'm doing 1. now.
Query Generator redesign(2) is not important for now, I think. It works
well.
asiri (SVN) wrote:
> Author: asiri
> Date: 2008-12-15 17:45:22 +0100 (Mon, 15 Dec 2008)
> New Revision: 14754
>
> Modified:
> platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/domain/DavPage.java
> platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/views/pages/PagesBySpaceNameSubView.java
> Log:
> XWIKI-2982: Not possible to rename pages / spaces via the WebDAV interface
>
> Fixed.
>
> Modified: platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/domain/DavPage.java
> ===================================================================
> --- platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/domain/DavPage.java 2008-12-15 16:44:07 UTC (rev 14753)
> +++ platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/domain/DavPage.java 2008-12-15 16:45:22 UTC (rev 14754)
> @@ -284,7 +284,9 @@
> */
> public void move(DavResource destination) throws DavException
> {
> - getContext().checkAccess("delete", this.name);
> + // Renaming a page requires edit rights on the current document, delete rights on the
> + // target document (if it exists) and edit rights on all the children of current document.
> + getContext().checkAccess("edit", this.name);
> XWikiDavResource dResource = (XWikiDavResource) destination;
> String dSpaceName = null;
> String dPageName = null;
> @@ -302,8 +304,10 @@
> String sql = "where doc.parent='" + this.name + "'";
> List<String> childDocNames = getContext().searchDocumentsNames(sql);
> // Validate access rights for the destination page.
> - getContext().checkAccess("edit", newDocName);
> - // Validate access rights for all the renamed pages.
> + if (getContext().exists(newDocName)) {
> + getContext().checkAccess("delete", newDocName);
> + }
You still have to check for edit right:
} else {
getContext().checkAccess("edit", newDocName);
}
> + // Validate access rights for all the child pages.
> for (String childDocName : childDocNames) {
> getContext().checkAccess("edit", childDocName);
> }
>
> Modified: platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/views/pages/PagesBySpaceNameSubView.java
> ===================================================================
> --- platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/views/pages/PagesBySpaceNameSubView.java 2008-12-15 16:44:07 UTC (rev 14753)
> +++ platform/core/trunk/xwiki-webdav/src/main/java/com/xpn/xwiki/plugin/webdav/resources/views/pages/PagesBySpaceNameSubView.java 2008-12-15 16:45:22 UTC (rev 14754)
> @@ -168,11 +168,10 @@
> removeTempResource((DavTempFile) member);
> } else if (member instanceof DavPage) {
> String pName = ((DavPage) member).getDisplayName();
> - if (getContext().hasAccess("delete", pName)) {
> - XWikiDocument childDoc = getContext().getDocument(pName);
> - if (!childDoc.isNew()) {
> - getContext().deleteDocument(childDoc);
> - }
> + getContext().checkAccess("delete", pName);
> + XWikiDocument childDoc = getContext().getDocument(pName);
> + if (!childDoc.isNew()) {
> + getContext().deleteDocument(childDoc);
> }
> } else {
> throw new DavException(DavServletResponse.SC_BAD_REQUEST);
> @@ -192,13 +191,15 @@
> if (getCollection().equals(dSpace.getCollection())) {
> String sql = "where doc.web='" + this.name + "'";
> List<String> docNames = getContext().searchDocumentsNames(sql);
> - // To rename an entire space, user should have delete rights on all the
> - // documents in the current space and edit rights on all the documents that
> - // will be created after the rename operation.
> + // To rename an entire space, user should have edit rights on all the
> + // documents in the current space and delete rights on all the documents that
> + // will be replaced (if they exist).
> for (String docName : docNames) {
> String newDocName = dSpace.getDisplayName() + "." + docName;
> - getContext().checkAccess("delete", docName);
> - getContext().checkAccess("edit", newDocName);
> + getContext().checkAccess("edit", docName);
> + if (getContext().exists(newDocName)) {
> + getContext().checkAccess("delete", newDocName);
> + }
This looks like duplication. Can you move this check in a common method?
> }
> for (String docName : docNames) {
> XWikiDocument doc = getContext().getDocument(docName);
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2008-12-15 18:26:24 +0100 (Mon, 15 Dec 2008)
> New Revision: 14755
>
> Modified:
> platform/skins/trunk/albatross/src/main/resources/albatross/wiki.css
> Log:
> XSALBATROSS-44: Add support for BoxMacro
>
> Modified: platform/skins/trunk/albatross/src/main/resources/albatross/wiki.css
> ===================================================================
> --- platform/skins/trunk/albatross/src/main/resources/albatross/wiki.css 2008-12-15 16:45:22 UTC (rev 14754)
> +++ platform/skins/trunk/albatross/src/main/resources/albatross/wiki.css 2008-12-15 17:26:24 UTC (rev 14755)
> @@ -75,6 +75,20 @@
> font-size: inherit;
> }
>
> +.box {
> + margin-top: 4px;
> + margin-bottom: 4px;
Could be replaced with the shorter:
margin: 0 4px;
> + padding: 5px 5px 5px 5px;
Could be replaced with the shorter:
padding: 5px;
> + color: inherit;
That's useless, since this is the default. Should be removed. If there's
another CSS rule that overrides this, than that rule should be either
removed or narrowed down to a more specific set of elements.
> + background-color: #eeeeee;
Could be replaced with the shorter:
background-color: #EEE;
> + border: 1px dotted #003366;
Could be replaced with the shorter:
border: 1px dotted #036;
> + font-size: 12px;
I prefer not to use px for font sizes, since this prevents increasing
the font size in IE6, for those that don't see so well.
> + line-height: 100%;
> + white-space: pre;
> + width: 70%;
> + overflow: auto;
> +}
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi devs,
Asiri has been around for a while (since last year's Summer of Code),
providing good code. He participated in the initial XEclipse design and
implementation, he wrote the WebDAV support, and is now managing the
Office Importer component.
I have been monitoring his commits, and the quality of his code has
rapidly increased. I believe that he deserves the right to commit his
own changes.
Here's my +1.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi devs,
I must recognize that I've lost contact with the status of development
of XWiki for some time. Sorry about that!
I will probably have to face some tasks here that will imply to manage
big files (>100Mb): pictures, raster maps, short video clips,... To
store all this stuff in the database (we are currently using MySQL) will
imply huge tables/databases.
Please, could you help me or point me in the right direction to catch up
with the discussion about using the file system as an
alternative/complementary repository for such kind of files?
Thanks you so much!
Ricardo
--
Ricardo RodrÃguez
Your EPEC Network ICT Team
Hi,
I'm hitting a problem I can't see the cause of again. When I try to
get the external url for a document, I get an exception:
Exception in thread "Thread-14" java.lang.NullPointerException
at com.xpn.xwiki.XWiki.getServletPath(XWiki.java:4317)
at
com
.xpn
.xwiki
.web.XWikiServletURLFactory.addServletPath(XWikiServletURLFactory.java:
208)
at
com
.xpn
.xwiki
.web.XWikiServletURLFactory.createURL(XWikiServletURLFactory.java:178)
at
com
.xpn
.xwiki
.web
.XWikiServletURLFactory.createExternalURL(XWikiServletURLFactory.java:
273)
at com.xpn.xwiki.doc.XWikiDocument.getExternalURL(XWikiDocument.java:
925)
Not tried to run it any other way but as xe-debug-web. I did not get
this problem before, can it have something to do with the switch to
version 1.7-SNAPSHOT? I'm not sure if it's related, but I also get a
LOT of these errors:
org.hibernate.ObjectNotFoundException: No row with the given
identifier exists: [com.xpn.xwiki.doc.XWikiDocument#723512152]
I tried flattening the database, let the xwiki rebuild it from
scratch, I keep getting these.
Cheers,
J.L.Simon