Last modified by Thomas Mortagne on 2023/10/13

From version 52.1
edited by Guillaume Delhumeau
on 2015/09/24
Change comment: There is no comment for this version
To version 46.1
edited by Guillaume Delhumeau
on 2015/09/24
Change comment: Upload new image [scriptRightsErrorNotAllowed.png, /xwiki/bin/downloadrev/ReleaseNotes/ReleaseNotesXWiki72/scriptRightsErrorNotAllowed.png?rev=1.1]

Summary

Details

Page properties
Content
... ... @@ -41,15 +41,17 @@
41 41  
42 42  A new Script Right has been added to allow controlling who has the right to write Scripts. Specifically anyone with Edit rights can edit a page and write a Script in it. However, when the page is rendered the script will only execute if the last author of the page has the Script right.
43 43  
44 +{{image reference="[email protected]"/}}
45 +
44 44  Example when the author of a script doesn't have the Script right:
45 45  
46 -{{image reference="scriptRightsErrorNotAllowed.png"/}}
48 +{{image reference="ReleaseNotesXWiki72M1@scriptRightsErrorNotAllowed.png"/}}
47 47  
48 48  The Script Right is set to DENY by default, meaning that if you do not have it explicitly, you will not be able to execute the scripts that you write with your user account.
49 49  
50 50  However, for backward-compatibility reasons, the standard XWiki Enterprise distribution comes with the Script Right being allowed for all users at the main wiki level, so that, unless you (as an Admin) explicitly revoke the right for some users or explicitly deny it, they will be able to execute the scripts they wrote, just like before.
51 51  
52 -{{image reference="scriptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
54 +{{image reference="ReleaseNotesXWiki72M2@scriptRightsExplicitlyAllowedInXWikiPreferences.png"/}}
53 53  
54 54  == Hiding of the Parent-Child Relationship ==
55 55  
... ... @@ -181,7 +181,7 @@
181 181  * When using the XWiki Jetty distribution, a memory dump is automatically created in XWiki's ##data/## folder when an ##Out Of Memory## error occurs.
182 182  * The Activity Stream now also displays activity for Nested Spaces.
183 183  
184 -See the [[full list of JIRA issues>>http://jira.xwiki.org/issues/?filter=14213]] fixed in this release.
186 +See the [[full list of JIRA issues>>http://jira.xwiki.org/sr/jira.issueviews:searchrequest-printable/temp/SearchRequest.html?jqlQuery=project+in+%28XCOMMONS%2C+XRENDERING%2C+XWIKI%2C+XE%29+and+status+%3D+Closed+and+resolution+%3D+Fixed+and+fixVersion+%3D+%22<version>%22&tempMax=1000]] fixed in this release.
185 185  
186 186  = For Developers =
187 187  
... ... @@ -321,70 +321,6 @@
321 321  
322 322  As explained previously, these logic is also available in the improved create UI, with the terminal pages option appearing only for advanced users and being checked or unchecked by default, depending on the type of the current page.
323 323  
324 -== JS API Improvements ==
325 -
326 -* It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
327 -{{code language="javascript"}}
328 -// Construct a Nested Space reference
329 -var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
330 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
331 -reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
332 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
333 -// Construct a non-Nested Space reference
334 -reference = new XWiki.SpaceReference('wiki', 'space');
335 -expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
336 -// Try passing non-valid space parameters
337 -expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
338 -expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
339 -{{/code}}
340 -)))
341 -* A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
342 -{{code language="javascript"}}
343 -var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
344 -var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
345 -var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
346 -expect(reference1.equals(reference2)).toBe(true);
347 -expect(reference1.equals(reference3)).toBe(false);
348 -{{/code}}
349 -)))
350 -* A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
351 -{{code language="javascript"}}
352 -var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
353 -{{/code}}
354 -)))
355 -* A new ##XWiki.EntityReferenceTree## JS class has been added, which partially mimics the Java ##EntityReferenceTree## Class. It's still missing features though as it was introduced mostly to make it easier to manipulate a serialized Java ##EntityReferenceTree##.
356 -
357 -== Updated Document Tree Macro ==
358 -
359 -The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Pages and Nested Spaces modes. Specifically, the following changes have been made:
360 -
361 -* removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
362 -* deprecated the ##showChildDocuments## parameter
363 -* added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
364 -
365 -As a result, you can use the document tree macro like this:
366 -
367 -* Nested Page Tree(((
368 -{{code language="none"}}
369 -{{documentTree/}}
370 -{{/code}}
371 -)))
372 -* Nested Space + Page Tree(((
373 -{{code language="none"}}
374 -{{documentTree showSpaces="true" /}}
375 -{{/code}}
376 -)))
377 -* Parent-Child Page Tree(((
378 -{{code language="none"}}
379 -{{documentTree hierarchyMode="parentchild" /}}
380 -{{/code}}
381 -)))
382 -* Old Page Index Tree (i.e. Parent-Child mixed with space grouping)(((
383 -{{code language="none"}}
384 -{{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
385 -{{/code}}
386 -)))
387 -
388 388  == New Reference-related APIs ==
389 389  
390 390  Various new API around References has been introduced while adding support for nested spaces.
... ... @@ -466,18 +466,6 @@
466 466  * The component ##RestURLGenerator## has been added. Its role, in the long term, is to generate a REST URL for any kind of EntityReference. It currently handles ##DocumentReference## and ##SpaceReference##.
467 467  * The corresponding script service has been added: ##$services.rest## with the method ##$services.rest.url($entityReference)##.
468 468  
469 -== Reference Scripting API for Nested Spaces ==
470 -
471 -The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
472 -
473 -{{code language="none"}}
474 -{{velocity}}
475 -$services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
476 -$services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
477 -$services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
478 -{{/velocity}}
479 -{{/code}}
480 -
481 481  === Resolve nested spaces in JavaScript ===
482 482  
483 483  {{code language="js"}}
... ... @@ -526,6 +526,82 @@
526 526  * ##checkCurrentAuthor()##: indicate if the current author right should be checked
527 527  * ##checkCurrentUser()##: indicate if the result should be filtered based on current user Right (only implemented by SOLR right now)
528 528  
455 +== JS API Improvements ==
456 +
457 +* It's now possible to create a Nested Spaces Reference using XWiki's Javascript API. For example:(((
458 +{{code language="javascript"}}
459 +// Construct a Nested Space reference
460 +var reference = new XWiki.SpaceReference('wiki', ['space1', 'space2']);
461 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2');
462 +reference = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
463 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space1.space2.page');
464 +// Construct a non-Nested Space reference
465 +reference = new XWiki.SpaceReference('wiki', 'space');
466 +expect(XWiki.Model.serialize(reference)).toEqual('wiki:space');
467 +// Try passing non-valid space parameters
468 +expect(function() {new XWiki.SpaceReference('wiki', [])}).toThrow('Missing mandatory space name or invalid type for: []');
469 +expect(function() {new XWiki.SpaceReference('wiki', 12)}).toThrow('Missing mandatory space name or invalid type for: [12]');
470 +{{/code}}
471 +)))
472 +* A new ##XWiki.EntityReference.equals()## method has been added. For example:(((
473 +{{code language="javascript"}}
474 +var reference1 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
475 +var reference2 = new XWiki.DocumentReference('wiki', ['space1', 'space2'], 'page');
476 +var reference3 = new XWiki.DocumentReference('wiki2', ['space1', 'space2'], 'page');
477 +expect(reference1.equals(reference2)).toBe(true);
478 +expect(reference1.equals(reference3)).toBe(false);
479 +{{/code}}
480 +)))
481 +* A new ##XWiki.EntityReference.fromJSONObject(obejct)## has been added to create a Javascript ##XWiki.EntityReference## from a Java ##EntityReference## directly serialized as JSON:(((
482 +{{code language="javascript"}}
483 +var reference = XWiki.EntityReference.fromJSONObject(jsonText.evalJSON());
484 +{{/code}}
485 +)))
486 +* A new ##XWiki.EntityReferenceTree## JS class has been added, which partially mimics the Java ##EntityReferenceTree## Class. It's still missing features though as it was introduced mostly to make it easier to manipulate a serialized Java ##EntityReferenceTree##.
487 +
488 +== Updated Document Tree Macro ==
489 +
490 +The [[Document Tree Macro>>extensions:Extension.Document Tree Macro]] now supports Nested Pages and Nested Spaces modes. Specifically, the following changes have been made:
491 +
492 +* removed the ##showSpaceAsDocument## parameter (was introduced recently in 7.2M1)
493 +* deprecated the ##showChildDocuments## parameter
494 +* added the ##hierarchyMode## parameter with two supported values: ##reference## (default) and ##parentchild##
495 +
496 +As a result, you can use the document tree macro like this:
497 +
498 +* Nested Page Tree(((
499 +{{code language="none"}}
500 +{{documentTree/}}
501 +{{/code}}
502 +)))
503 +* Nested Space + Page Tree(((
504 +{{code language="none"}}
505 +{{documentTree showSpaces="true" /}}
506 +{{/code}}
507 +)))
508 +* Parent-Child Page Tree(((
509 +{{code language="none"}}
510 +{{documentTree hierarchyMode="parentchild" /}}
511 +{{/code}}
512 +)))
513 +* Old Page Index Tree (i.e. Parent-Child mixed with space grouping)(((
514 +{{code language="none"}}
515 +{{documentTree hierarchyMode="parentchild" showSpaces="true" /}}
516 +{{/code}}
517 +)))
518 +
519 +== Reference Scripting API for Nested Spaces ==
520 +
521 +The Script API for Entity References has been updated with new APIs to support creating Nested Spaces references. For example:
522 +
523 +{{code language="none"}}
524 +{{velocity}}
525 +$services.model.createDocumentReference("wiki", ["space1", "space2"], "page")
526 +$services.model.createDocumentReference("wiki", ["space1", "space2"], "page", "default")
527 +$services.model.createSpaceReference(["space1", "space2"], $services.model.createWikiReference("wiki"))
528 +{{/velocity}}
529 +{{/code}}
530 +
529 529  == XWiki Select Widget ==
530 530  
531 531  A [[new widget has been introduced>>platform:DevGuide.XWikiSelect]], to have a rich select box:
... ... @@ -669,4 +669,3 @@
669 669  {{code language="none"}}
670 670  <clirr output here>
671 671  {{/code}}
672 -
scriptRightsExplicitlyAllowedInXWikiPreferences.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.gdelhumeau
Size
... ... @@ -1,1 +1,0 @@
1 -26.7 KB
Content
OfficeImporter.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.gdelhumeau
Size
... ... @@ -1,0 +1,1 @@
1 +88.3 KB
Content

Get Connected