Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14830

DefaultValue for property "allow" of an object "XWiki.XWikiRights"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 9.9
    • REST
    • None
    • Debian
      XWiki Debian 9.9
    • Unknown
    • Code

    Description

      With REST if I list propertie "allow" details of a XWiki.XWikiRights object I have that kind of result (.../xwiki/rest/wikis/xwiki/spaces/.../pages/WebHome/objects/XWiki.XWikiRights/12/properties/allow) :

      <property name="allow" type="Boolean">
      <link href=".../xwiki/rest/wikis/xwiki/spaces/.../pages/WebHome/objects/XWiki.XWikiRights/12/properties/allow" rel="self"/><link href=".../xwiki/rest/wikis/xwiki/spaces/.../pages/WebHome/objects/XWiki.XWikiRights/12" rel="http://www.xwiki.org/rel/object"/>
      <attribute name="name" value="allow"/>
      <attribute name="prettyName" value="Allow/Deny"/>
      <attribute name="unmodifiable" value="0"/>
      <attribute name="disabled" value="0"/>
      <attribute name="displayFormType" value="select"/>
      <attribute name="defaultValue" value="1"/>
      <attribute name="displayType" value="allow"/>
      <attribute name="number" value="4"/>
      <value/>
      </property>
      

      According to above I suppose there is a default value of "1" for the creation of this object is the case I don't affect a value to this propertie.
      But if I create a new object with this script :

      curl -u admin:admin \
      -X POST \
      -H "Content-type: application/xml" \
      -H "Accept: application/xml" \
      -d "@test9.xml" \
      .../xwiki/rest/wikis/xwiki/spaces/.../pages/WebHome/objects
      

      And the content of test9.xml is :

      <object xmlns="http://www.xwiki.org">
      <className>XWiki.XWikiRights</className>
      <property name="groups"><value>XWiki.GroupeUn</value></property>
      <property name="levels"><value>login,view,edit,delete,comment,script,programming</value></property>
      <property name="users"><value></value></property>
      </object>
      

      The new object has no default value for property "allow".

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              Camille_D Camille Desmots
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: