Release Notes for XWiki 6.1 RC 1

Last modified by Thomas Mortagne on 2017/03/24

This is the release notes for XWiki Commons, XWiki Rendering, XWiki Platform and XWiki Enterprise. They share the same release notes as they are released together and have the same version.

This introduce new script APIs related to logging, security, rendering and continue the work on new Flamingo skin.

New and Noteworthy (since XWiki 6.1 milestone 2)

Full list of issues fixed and Dashboard for 6.1.

Flamingo Skin

  • The preview action has been implemented:

    preview.png

  • The user's avatar is now displayed in the main menu:

    navbar.png

  • 'Share by email' menu entry is moved from 'Page' submenu to 'More actions' submenu:

    moreActions.png

  • Buttons have now gradients:

    gradients.png

  • Annotations are back!

    flamingo-annotations.png

  • A lot of polishing have been made too, in order to have a skin usable in production.

See the full list of JIRA issues fixed in this release.

For Developers

Log from a script

A new API to get a SLF4J Logger has been added to the logging script service.

$services.logging.getLogger('My script').info('Hello {}', 'world')

New contextual authorization manager role

A new role is now available to ease the replacement of the old Right Service (com.xpn.xwiki.user.api.XWikiRightService).
Compared to the old service, the component does not manage authentication which should have been ensured previously if needed. (No redirection to login is ever done)
The new component has a similar interface to the AuthorizationManager, but it take care of all external context aspects, like the currently executed macro block, the rendering context restrictions, the dropping of rights, etc...
This new role should be used from now on by any component that needs to check rights for the current user, in the current context.

New security authorization script service

A new script service is now available to access the default AuthorizationManager and the ContextualAuthorizationManager.

Here is some sample:

#if ($services.security.authorization.hasAccess("edit"))
... show some UI that require edit access on the current document by the current user ...
#end
#if ($services.security.authorization.hasAccess("edit", "xwiki:Sandbox.TestPage1"))
... show some UI that require edit access on Sandbox.TestPage1 document by the current user ...
#end
#if ($services.security.authorization.hasAccess("edit", "xwiki:XWiki.User1", "xwiki:Sandbox.TestPage1"))
... show some UI that require edit access on Sandbox.TestPage1 document by XWiki.User1 ...
#end
$services.security.authorization.checkAccess("edit")
... do some task that require edit access ...

In this second sample, the macro will fail with an AccessDeniedException if the right is not allowed.

Access to BlockMatchers from velocity scripts

To be able to use the Block.getBlocks(BlockMatcher, Block.Axes) method on the rendering blocks in the documents XDOM from velocity, a converter has been introduced that maps string expressions to BlockMatcher objects. The current implementation only supports mapping to ClassBlockMatchers, and allows to get all blocks of a given type from the XDOM.

#foreach($headerBlock in $doc.getDocument().getXDOM().getBlocks("class:HeaderBlock", "DESCENDANT"))
   ... do something with the header block ...

Upgrades

The following dependencies have been upgraded:

Miscellaneous

  • The Mail Sender API now allows to send Mails from a Template. This is achieved with 2 calls:
    • One for setting the Subject from the Template. The following will generate a MimeMessage with the subject pre-filled. The value will be that of the subject xproperty from an XWiki.Mail xobject in the Document pointed to by the passed documentReference:
      #set ($message = $services.mailsender.createMessage("template", documentReference, parameters))
    • One for setting the Body Part content from the Template:
      $message.addPart("xwiki/template", $documentReference, {"velocityVariables" : { "var1" : "value1" }})
      $message.addPart("xwiki/template", $documentReference, {"velocityVariables" : { "var1" : "value1" }, "attachments" : $attachments})

Translations

The following translations have been updated: 

Tested Browsers & Databases

Here is the list of browsers we support and how they have been tested for this release:

BrowserStatus
Chrome30.pngGoogle Chrome 35Not Tested
Firefox30.pngMozilla Firefox 30 Jira Tickets Marked as Fixed in the Release Notes
IE30.pngInternet Explorer 8Not Tested
IE30.pngInternet Explorer 9Not Tested

Here is the list of databases we support and how they have been tested for this release:

DatabaseStatus
hypersql.pngHyperSQL 2.3.2 Jira Tickets Marked as Fixed in the Release Notes
mysql.pngMySQL 5.6.17Not Tested
oracle.pngOracle 11.2Not Tested
postgresql.pngPostgreSQL 9.3.4Not Tested

For the full list of tests see this page.

Known issues

Backward Compatibility and Migration Notes

General Notes

When upgrading make sure you compare your xwiki.cfg, xwiki.properties and web.xml files with the newest version since some configuration parameters may have been modified or added. Note that you should add xwiki.store.migration=1 so that XWiki will attempt to automatically migrate your current database to the new schema. Make sure you backup your Database before doing anything.

API Breakages

The following APIs were modified since XWiki 6.0:

  • Young APIs
org.xwiki.activeinstalls.server.DataManager: Method 'public com.google.gson.JsonObject countInstalls(java.lang.String, java.lang.String, java.util.Map)' has been added to an interface
org.xwiki.activeinstalls.server.DataManager: Method 'public long getInstallCount(java.lang.String)' has been removed
org.xwiki.activeinstalls.server.DataManager: Method 'public com.google.gson.JsonObject searchInstalls(java.lang.String, java.lang.String, java.util.Map)' has been added to an interface
org.xwiki.activeinstalls.server.script.ActiveInstallsScriptService: Method 'public long getInstallCount(java.lang.String)' has been removed
org.xwiki.crypto.store.CertificateStore: Class org.xwiki.crypto.store.CertificateStore removed
org.xwiki.crypto.store.CertificateStoreException: Class org.xwiki.crypto.store.CertificateStoreException removed
org.xwiki.crypto.store.KeyStore: Class org.xwiki.crypto.store.KeyStore removed
org.xwiki.crypto.store.KeyStoreException: Class org.xwiki.crypto.store.KeyStoreException removed
  • Not supposed to be public
com.xpn.xwiki.store.XWikiHibernateBaseStore: In method 'protected void createHibernateSequenceIfRequired(java.lang.String, org.hibernate.Session)' the number of arguments has changed
com.xpn.xwiki.render.XWikiMacrosMappingRenderer: Removed org.xwiki.observation.EventListener from the set of implemented interfaces
com.xpn.xwiki.render.XWikiMacrosMappingRenderer: Method 'public java.util.List getEvents()' has been removed
com.xpn.xwiki.render.XWikiMacrosMappingRenderer: Method 'public java.lang.String getName()' has been removed
com.xpn.xwiki.render.XWikiMacrosMappingRenderer: Method 'public void onEvent(org.xwiki.observation.event.Event, java.lang.Object, java.lang.Object)' has been removed
Tags:
   

Get Connected