I have a separate application which has its own users and permission system.
I would like to restrict access
to some xwiki spaces according to my app permissions. I overrided
XWikiCachingRightService class and use
checkAccess(String action, XWikiDocument doc, XWikiContext context)
function. The problem I have is
it's impossible to restrict access to search with this approach. I only need
to restrict access to spaces with
permissions. So, I need somehow make xwiki aware about my permissions (which
spaces user can see). What XWiki
java class can I use for this?
~
--
View this message in context: http://xwiki.475771.n2.nabble.com/What-is-the-right-way-to-implement-XWiki-…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi devs,
I’m implementing http://jira.xwiki.org/browse/XWIKI-10375 ("Refactor the temporary resource concept inside the Resource module”) and I need to define a URL format for the new “tmp” resource type.
I’m proposing the following:
http://<server>/<context>/tmp/<module id>/<serialized owner document reference>/<module-dependent resource path>
This is based on the existing TemporaryResourceReference at:
https://github.com/xwiki/xwiki-platform/blob/96caad053c14fc5546e9bc141bc284…
For example:
http://<server>/<context>/tmp/officeviewer/A.B.WebHome/Q29tcGFueSBQcmVzZW50YXRpb24ucHB0/Company+Presentation-slide0.jpg
Note that in this example from the officeviewer macro the module-dependent resource path consists in:
- base64(name of office attachment + hashcode(parameters))
- generated image name from PPT
In this case, the implementation would generate the following file:
[TMPDIR]/officeviewer/A/B/WebHome/Q29tcGFueSBQcmVzZW50YXRpb24ucHB0/Company+Presentation-slide0.jpg
WDYT?
Thanks
-Vincent
Verified this issue on a clean Windows 10 64-bit install with Chrome
50.0.2661.75 m (64-bit) though the original issue was noticed on a previous
version of Chrome. Issue only occurs on Chrome, not on Firefox or IE.
When selecting an item from the menu bar such as the cog or vertical
ellipses icon, Chrome does a screen refresh causing the popup menu to
disappear before items can be selected. Can post a video showing effect if
necessary.
REGARDS
Peter
--
View this message in context: http://xwiki.475771.n2.nabble.com/Menu-Issues-With-Chrome-on-Windows-10-for…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
I use InstalledExtensionScriptService class to retrieve a list of installed
extensions. I would like automatically upgrade RTWysiwyg (or any other)
extension if the current version less than the version in my jar file
(hardcoded). When I try to use ExtensionManagerScriptService class to
uninstall existing extension and then install the new one XWiki freezes. I
studied xwiki docs and think it can be a conflict. What should I do?
--
View this message in context: http://xwiki.475771.n2.nabble.com/Is-it-possible-to-upgrade-xwiki-extension…
Sent from the XWiki- Dev mailing list archive at Nabble.com.
On 04/13/2016 03:10 AM, Thomas Mortagne wrote:
> On Tue, Apr 12, 2016 at 10:11 PM, Vincent Massol <vincent(a)massol.net> wrote:
>> Hi Peter,
>>
>>> On 05 Apr 2016, at 19:28, Peter Huisman <p.huisman(a)ximm.nl> wrote:
>>>
>>> From the XWiki source code, I see there is a difference in passing a document to the evenmanager:
>>>
>>> The DocumentDeletingEvent is passing a “new XWikiDocument(doc.getDocumentReference())"
>>> The DocumentUpdatedEvent (as an example) is passing the doc (the actual XWikiDocument)
>>>
>>> The difference is, that the Document passed in the DeleteEvent is a new XWikiDocument and not the XWikiDocument that is about to be deleted.
>>>
>>> Is there a reason why this difference exists?
>>
>> he code in the XWiki class doing the notify has been there for a long time AFAICS:
>>
>> om.notify(new DocumentDeletingEvent(doc.getDocumentReference()),
>> new XWikiDocument(doc.getDocumentReference()), context);
>>
>> However, I think it’s not correct. I think it should pass the document and not a clone, because an Event Listener should be able to modify the instance that’s going to be saved.
>
> It's a delete not a save so modifying it would be useless. I guess the
> intend here was to have the same kind of data than what you get with
> DocumentDeletedEvent.
>
> What is wrong and should be fixed is that the document sent with the
> event should have the real one as original document (exactly like it's
> done for DocumentDeletedEvent).
Thomas is right, the data sent in the event is supposed to be what the
database will contain after the event is done, and that's what will
(apparently, but not actually) be in the database after the delete: a
new blank document, and doc.originalDoc should be what was before the
change in the database. At least this was the original intention, all
events should behave like this, so that a diff can be computed between
doc and originalDoc regardless of what action happened to the document.
However, the Javadoc for DocumentDeletingEvent is misleading:
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
>>
>> So I’d open a bug for this. Let’s see if the others agree.
>>
>> Thanks
>> -Vincent
>>
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
I extended AbstractMacro with my class. When I execute macro with `execute`
function I don't have access to the space name on which the macro is called.
I would like to customize output depending on the current space. All I need
is just space name as a string. How to get space name inside `execute`
function? I suppose it can be some dependency injection, but I'm don't know
what to use.
--
View this message in context: http://xwiki.475771.n2.nabble.com/How-to-get-space-name-s-when-I-execute-ma…
Sent from the XWiki- Dev mailing list archive at Nabble.com.