Hello everyone.
I'm currently developing my skills with velocity to be able to make more
advanced applications.
Today what I'm trying to do is set some rights based on a modified version
of FAQ Application. I've added just a Group field, so the user can direct
his question to one of our departaments/groups.
What I'm trying to accomplish is: A user creates a FAQ question, but only
himself and a Group he chooses are able to view and edit the page.
#set ($mydoc = $xwiki.getDocument("FAQ.$doc.name"))
#set ($rightsObject = $mydoc.getObject("XWiki.XWikiRights", true))
#set ($result = $rightsObject.set("groups", $doc.display("group",
"view")))
#set ($result = $rightsObject.set("levels", "edit"))
#set ($result = $rightsObject.set("users", ""))
#set ($result = $rightsObject.set("allow", 1))
$mydoc.save()
Problem: The object created with doc.display("group") gets the group with
the all the wiki markup, when it should be getting only the text "Sales".
What I get: {{html clean="false" wiki="false"}} <ul class="users">...
What I want: Sales
I can easily set the user permission. The big problem is setting the group.
Can you help me with this?
Thanks.
Att,
Leonardo.
Hello everyone,
During the last few weeks I’ve verified a large part of the extensions
found on extensions.xwiki.org, in order to see which of them are compatible
with the latest XWiki versions.
On the pages of the extensions you will notice that the following data has
been updated:
- Compatibility (where necessary, for instance in the case of extensions
that are included in XWiki by default, compatibility has not been updated);
- Problems and issues that may occur, which are mentioned in a field
related to compatibility;
- Text (I’ve updated where I considered necessary and used the
descriptive text of extensions in this regard);
- New images, in the cases where the old ones failed to correspond with
the extension;
- Image syntax has also been updated, as a large number of extensions
did not have their syntax updated with {{image reference=image.png/}}).
Periodically, I will update all the extensions that will be published on
extensions.xwiki.org and I will also check on the old ones in order to
verify their compatibility with the newer versions of XWiki.
If you have any suggestions regarding the extensions, please let me know.
Thank you for your time,
Andreea
This is just a code to get the existing bindings and yes it does not
replace the SRD. What we really need to automate the generation of the
SRD but nobody had the time to work on it yet.
Note that in that list you don't only have public APIs but also any
velocity variable previously defined.
Another probably more usefull list is the list of script services
since I doubt there is any new standard binding since 5.x but there is
new script services:
{{velocity}}
#foreach($service in
$services.component.componentManager.getInstanceList('org.xwiki.script.service.ScriptService'))
* **\$services.$$service** ($service.class)
#end
{{/velocity}}
On Wed, Aug 27, 2014 at 1:41 PM, Dmitry Bakbardin <haru_mamburu(a)mail.ru> wrote:
> Thanks, Thomas!
>
> It works fine and gives me following (on 5.x)
> Some bindings I can guess and use in e.g. #if ($isSuperAdmin) ... #end.
> Excellent!
> What I was talking about is binding -> Method Summary is missing in this
> case. It is extremely useful for me in
> http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation?xpage=embed , but
> even with the guide I have no clue how to rebuild this for 6.x
> documentation, I'm not an Java developer :(
>
>
> $editorUrl (class java.lang.String)
> $hasWatch (class java.lang.String)
> $hasPreviousMenuSection (class java.lang.String)
> $isMainWikiUser (class java.lang.String)
> $spaceDeleteUrl (class java.lang.String)
> $displayLanguageChoice (class java.lang.String)
> $mainWikiHomeDocumentReference (class java.lang.String)
> $XWIKIVARS_VM (class java.lang.String)
> $hasCreatePage (class java.lang.String)
> $macro (class java.lang.String)
> $officeImporterMainDocument (class java.lang.String)
> $defaultStyleURL (class java.lang.String)
> $ooconfig (class java.lang.String)
> $spaceIndexUrl (class java.lang.String)
> $createWikiDocReference (class java.lang.String)
> $spaceHome (class java.lang.String)
> $template (class java.lang.String)
> $services (class java.lang.String)
> $parent (class java.lang.String)
> $isInPortletMode (class java.lang.String)
> $copyright (class java.lang.String)
> $searchDoc (class java.lang.String)
> $bodyTagName (class java.lang.String)
> $logoname (class java.lang.String)
> $displayHomeMenu (class java.lang.String)
> $isGuest (class java.lang.String)
> $displayContentMenu (class java.lang.String)
> $isAdminAppInstalled (class java.lang.String)
> $spaceAdminDocRef (class java.lang.String)
> $showhistory (class java.lang.String)
> $displayPageSubmenu (class java.lang.String)
> $watchClasses (class java.lang.String)
> $hasCreateWiki (class java.lang.String)
> $displayCreateSubmenu (class java.lang.String)
> $reservedSpaceName (class java.lang.String)
> $languageparams (class java.lang.String)
> $deleteUrl (class java.lang.String)
> $preferencesDoc (class java.lang.String)
> $xwiki (class java.lang.String)
> $discard (class java.lang.String)
> $stylesheets (class java.lang.String)
> $docvariant (class java.lang.String)
> $canShare (class java.lang.String)
> $logredir (class java.lang.String)
> $title (class java.lang.String)
> $hasDashboard (class java.lang.String)
> $spaceDoc (class java.lang.String)
> $hasSpaceAdmin (class java.lang.String)
> $isReadOnly (class java.lang.String)
> $keyboardShortcutsEnabled (class java.lang.String)
> $reservedDocumentReference (class java.lang.String)
> $officeimporter (class java.lang.String)
> $settingValue (class java.lang.String)
> $themeDocFullName (class java.lang.String)
> $backToEditAction (class java.lang.String)
> $cdoc (class java.lang.String)
> $displayCreateWiki (class java.lang.String)
> $syntaxFactory (class java.lang.String)
> $displayMainMenu (class java.lang.String)
> $theme (class java.lang.String)
> $spaceViewUrl (class java.lang.String)
> $hasCreateSpace (class java.lang.String)
> $gradientColorsToRemove (class java.lang.String)
> $logourl (class java.lang.String)
> $defaultstyle (class java.lang.String)
> $showattachments (class java.lang.String)
> $a11y (class java.lang.String)
> $searchSuggestConfigObject (class java.lang.String)
> $doc (class java.lang.String)
> $isWikiAPIAvailable (class java.lang.String)
> $crtUserDoc (class java.lang.String)
> $annotations (class java.lang.String)
> $showRightPanels (class java.lang.String)
> $xwikimode (class java.lang.String)
> $oomanager (class java.lang.String)
> $headertitle (class java.lang.String)
> $hasAdmin (class java.lang.String)
> $showannotations (class java.lang.String)
> $canDelete (class java.lang.String)
> $sectionNumber (class java.lang.String)
> $logouturl (class java.lang.String)
> $pdoc (class java.lang.String)
> $blacklistedSpaces (class java.lang.String)
> $skin (class java.lang.String)
> $colsclass (class java.lang.String)
> $canWatch (class java.lang.String)
> $isSuperAdmin (class java.lang.String)
> $level (class java.lang.String)
> $hasGlobalAdmin (class java.lang.String)
> $displayWikiSubmenu (class java.lang.String)
> $nstring (class java.lang.String)
> $linktextwords (class java.lang.String)
> $request (class java.lang.String)
> $tdoc (class java.lang.String)
> $viewUrl (class java.lang.String)
> $isWikiUIAvailable (class java.lang.String)
> $hasadmin (class java.lang.String)
> $revparams (class java.lang.String)
> $keywords (class java.lang.String)
> $isInServletMode (class java.lang.String)
> $displaySpaceSubmenu (class java.lang.String)
> $hasEdit (class java.lang.String)
> $wikiEntryText (class java.lang.String)
> $msg (class java.lang.String)
> $isguest (class java.lang.String)
> $leftPanels (class java.lang.String)
> $pdocurl (class java.lang.String)
> $deleteWikiPageReference (class java.lang.String)
> $WikiManagerMainDocReference (class java.lang.String)
> $userObj (class java.lang.String)
> $adminspaceaction (class java.lang.String)
> $bodyAction (class java.lang.String)
> $xcontext (class java.lang.String)
> $editActions (class java.lang.String)
> $globalprefs (class java.lang.String)
> $reservedDocumentName (class java.lang.String)
> $searchSuggestConfigDocument (class java.lang.String)
> $displayShortcuts (class java.lang.String)
> $util (class java.lang.String)
> $parents (class java.lang.String)
> $canDeleteWiki (class java.lang.String)
> $spacePreferencesDocumentReference (class java.lang.String)
> $locale (class java.lang.String)
> $showinformation (class java.lang.String)
> $isAdvancedUser (class java.lang.String)
> $themeObj (class java.lang.String)
> $wikiEntryId (class java.lang.String)
> $adminwikiaction (class java.lang.String)
> $captchaservice (class java.lang.String)
> $displayQuickSearch (class java.lang.String)
> $wikiName (class java.lang.String)
> $sourceId (class java.lang.String)
> $response (class java.lang.String)
> $hasProgramming (class java.lang.String)
> $unwatchClasses (class java.lang.String)
> $themeDoc (class java.lang.String)
> $canView (class java.lang.String)
> $parentDoc (class java.lang.String)
> $importaction (class java.lang.String)
> $spaceprefs (class java.lang.String)
> $rightPanels (class java.lang.String)
> $displayDocExtra (class java.lang.String)
> $hasedit (class java.lang.String)
> $showcomments (class java.lang.String)
> $canCopy (class java.lang.String)
> $searchSuggestConfigHash (class java.lang.String)
> $hasComment (class java.lang.String)
> $context (class java.lang.String)
> $sep (class java.lang.String)
> $showLeftPanels (class java.lang.String)
>
>
>
>
> Wed, 27 Aug 2014 13:17:14 +0200 от Thomas Mortagne
> <thomas.mortagne(a)xwiki.com>:
>
> {{velocity}}
> #foreach($binding in $xcontext.vcontext.getKeys())
> * **$${binding}** ($binding.class)
> #end
> {{/velocity}}
>
> On Wed, Aug 27, 2014 at 1:16 PM, Thomas Mortagne
> <thomas.mortagne(a)xwiki.com> wrote:
>> The following should give you all Velocity bindings currently
>> available (you need programming right):
>>
>> {{velocity}}
>> #foreach($binding in $xcontext.vcontext.getKeys())
>> * $${binding}
>> #end
>> {{/velocity}}
>>
>> On Wed, Aug 27, 2014 at 12:51 PM, Dmitry Bakbardin <haru_mamburu(a)mail.ru>
>> wrote:
>>> Thanks, Thomas!
>>>
>>> This javadoc contains everything besides bindings. Bindings in
>>> http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation?xpage=embed looks
>>> fine for me - they are grouped exactly one can need it in velocity
>>> programming, but only up to 5.x
>>>
>>>
>>> Wed, 27 Aug 2014 11:21:01 +0200 от Thomas Mortagne
>>> <thomas.mortagne(a)xwiki.com>:
>>>
>>> A good way to have always up to date javadoc is by using
>>> http://nexus.xwiki.org/nexus/index.html#nexus-search. See
>>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/API#HHowtofindaclass.
>>>
>>> On Mon, Aug 25, 2014 at 10:29 AM, Marius Dumitru Florea
>>> <mariusdumitru.florea(a)xwiki.com> wrote:
>>>> On Fri, Aug 22, 2014 at 2:16 PM, Dmitry Bakbardin <haru_mamburu(a)mail.ru>
>>>> wrote:
>>>>> Hi!
>>>>>
>>>>
>>>>> Marius, http://platform.xwiki.org/xwiki/bin/view/SRD/Navigation
>>>>> contains
>>>>> documentation up to 5.x. Where one can find 6.x documentation in the
>>>>> same
>>>>> way?
>>>>
>>>> Indeed, the SRD hasn't been updated in a while. There's a document
>>>> explaining how to update it
>>>> http://platform.xwiki.org/xwiki/bin/view/SRD/HowToBuild but I guess no
>>>> one had the time to do it recently. In any case, most of the 5.x API
>>>> should be present in 6.x.
>>>>
>>>> Thanks,
>>>> Marius
>>>>
>>>>>
>>>>>
>>>>> Fri, 22 Aug 2014 11:16:44 +0300 от Marius Dumitru Florea
>>>>> <mariusdumitru.florea(a)xwiki.com>:
>>>>>>On Wed, Aug 20, 2014 at 9:11 PM, Leonardo Kodato
>>>>>>< leonardokodato(a)gmail.com > wrote:
>>>>>>> Hello everyone.
>>>>>>>
>>>>>>> I'm currently developing my skills with velocity to be able to make
>>>>>>> more
>>>>>>> advanced applications.
>>>>>>> Today what I'm trying to do is set some rights based on a modified
>>>>>>> version
>>>>>>> of FAQ Application. I've added just a Group field, so the user can
>>>>>>> direct
>>>>>>> his question to one of our departaments/groups.
>>>>>>>
>>>>>>> What I'm trying to accomplish is: A user creates a FAQ question, but
>>>>>>> only
>>>>>>> himself and a Group he chooses are able to view and edit the page.
>>>>>>>
>>>>>>> #set ($mydoc = $xwiki.getDocument("FAQ.$doc.name"))
>>>>>>> #set ($rightsObject = $mydoc.getObject("XWiki.XWikiRights", true))
>>>>>>
>>>>>>> #set ($result = $rightsObject.set("groups", $doc.display("group",
>>>>>>> "view")))
>>>>>>
>>>>>>In http://platform.xwiki.org/xwiki/bin/view/DevGuide/ there is a link
>>>>>>to "Scripting Reference Documentation". Select $doc and look for
>>>>>>getValue.
>>>>>>
>>>>>>Hope this helps,
>>>>>>Marius
>>>>>>
>>>>>>> #set ($result = $rightsObject.set("levels", "edit"))
>>>>>>> #set ($result = $rightsObject.set("users", ""))
>>>>>>> #set ($result = $rightsObject.set("allow", 1))
>>>>>>> $mydoc.save()
>>>>>>>
>>>>>>> Problem: The object created with doc.display("group") gets the group
>>>>>>> with
>>>>>>> the all the wiki markup, when it should be getting only the text
>>>>>>> "Sales".
>>>>>>>
>>>>>>> What I get: {{html clean="false" wiki="false"}} <ul class="users">...
>>>>>>> What I want: Sales
>>>>>>>
>>>>>>> I can easily set the user permission. The big problem is setting the
>>>>>>> group.
>>>>>>>
>>>>>>> Can you help me with this?
>>>>>>>
>>>>>>> Thanks.
>>>>>>> Att,
>>>>>>> Leonardo.
>>>>>>> _______________________________________________
>>>>>>> users mailing list
>>>>>>> users(a)xwiki.org
>>>>>>> http://lists.xwiki.org/mailman/listinfo/users
>>>>>>_______________________________________________
>>>>>>users mailing list
>>>>>>users(a)xwiki.org
>>>>>>http://lists.xwiki.org/mailman/listinfo/users
>>>>>
>>>>>
>>>>> Kind regards,
>>>>>
>>>>> Dmitry
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users(a)xwiki.org
>>>>> http://lists.xwiki.org/mailman/listinfo/users
>>>> _______________________________________________
>>>> users mailing list
>>>> users(a)xwiki.org
>>>> http://lists.xwiki.org/mailman/listinfo/users
>>>
>>>
>>>
>>> --
>>> Thomas Mortagne
>>>
>>>
>>>
>>> Kind regards,
>>>
>>> Dmitry
>>
>>
>>
>> --
>> Thomas Mortagne
>
>
>
> --
> Thomas Mortagne
>
>
>
> Kind regards,
>
> Dmitry
--
Thomas Mortagne
Hello XWiki Community,
Got some issue with executing groovy in a page ...
I have a page with a groovy class, that needs some jars dependencies.
The following "works":
{{groovy jars="attach:toto.jar,..."}}
import ...
public class MyClass {
...
}
def myobj = new MyClass()
// do something with myobj ...
{{/groovy}}
Then I'd like to execute this code from another page.
So I removed the {{groovy}} macro tags and the isolated code at the end,
leaving only the class declaration and imports.
>From the other page I use the following version of parseGroovyFromPage:
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/XWik…
I provide it with the name of the page containing my groovy class, twice
(once for the script and once for the jars).
It results in a page loading infinitely until it time-outs ... From the
logs it seems my class never gets executed.
Any idea ?
Note: I think it's a "crappy" method, and I plan to put this as a java
component, but in a "proof of concept" stage the groovy script is very
useful.
Thanks,
Jeremie
Hello, can someone please give me an example of how to write to a log using Velocity code?
I'd really like to write a text file, but at this point any logging would be tremendously helpful, thanks
I would like to have XWiki authenticate logins by accessing a local LDAP server and validate the password using SSHA (comparison of hashed login plus salt). Could anyone give me a definitive answer as to whether this can be done using existing extensions? I've gone round in circles reading old posts and JIRA issues, and I'm more lost than before.
If it isn't possible with current extensions, could anyone suggest a good approach to implementing support? I had thought to use the LDAP Administration module, so perhaps there's a way to add something small over the top?
Any useful responses would be much appreciated.
B
I recently upgraded from xwiki enterprise 4.4.1 to version 6.1. I am running on Redhat Enterprise 6.3 OS and using tomcat6. I put the new war into place, updated the config files as necessary and then started up. I went through the wizard process for the upgrade and things seem to go fairly well. But after that completed my ldap setup does not seem to be running. I cannot log in with my username and password from ldap. Some of the errors I have been seeing are:
2014-08-14 11:12:32,576 [https://san-xwiki-sb.cscr.hp.com:8443/xwiki/bin/login/XWiki/XWikiLogin?srid…] WARN u.i.x.MyPersistentLoginManager - Login cookie validation hash mismatch! Cookies have been tampered with
I am not sure where to go and not finding useful information on the web.
A couple of questions if anyone has some good answers:
1. How do you check the ldap settings for xwiki? I have checked and rechecked the ldap settings in my config files but not seeing indications of what wrong.
2. Do the previous credentials that were cached for the users need to be wiped out so when persons log on they come in and register fresh? If so, how?
3. Are there other log files besides the catalina.out file from tomcat that may have information about the issues?
4. Any other suggestions of things to look at or try?
I am working this out on my sandbox so I am open to things to try.
Thanks.
-------------------------------------
Bruce J. Rust
Hi guys,
I have installed a new Wiki on a 2012 R2 Windows Server.
I also installed the standard Wiki. Now i have a Problem with PDF
attachments.
When I upload the PDF attachment and make a Link with the Admin User the PDF
is opened in browser when klicking the link or directly the attachment under
the page.
When I upload the PDF attachment with a registered user the PDF is
downloaded directly, wether the User is in the XWikiAdminGroup or not.
As browser I use Chrome or IE. Both the same. How can I configure that the
PDF is always opened in a browser window?
Thanks in advance.
Best Regards,
WEKU
--
View this message in context: http://xwiki.475771.n2.nabble.com/PDF-Attachment-is-downloaded-instead-of-o…
Sent from the XWiki- Users mailing list archive at Nabble.com.