acl.xsd 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  9. <xs:element name="config">
  10. <xs:complexType>
  11. <xs:sequence>
  12. <xs:element name="acl">
  13. <xs:complexType>
  14. <xs:sequence>
  15. <xs:element name="resources">
  16. <xs:complexType>
  17. <xs:sequence>
  18. <xs:element minOccurs="0" maxOccurs="unbounded" name="resource" type="aclResource" />
  19. </xs:sequence>
  20. </xs:complexType>
  21. <xs:unique name="uniqueResourceId">
  22. <xs:annotation>
  23. <xs:documentation>
  24. Attribute id is unique under all ACL resources
  25. </xs:documentation>
  26. </xs:annotation>
  27. <xs:selector xpath=".//*"/>
  28. <xs:field xpath="@id"/>
  29. </xs:unique>
  30. </xs:element>
  31. </xs:sequence>
  32. </xs:complexType>
  33. </xs:element>
  34. </xs:sequence>
  35. </xs:complexType>
  36. </xs:element>
  37. <xs:complexType name="aclResource">
  38. <xs:annotation>
  39. <xs:documentation>
  40. ACL Resource. Recursive complex type
  41. </xs:documentation>
  42. </xs:annotation>
  43. <xs:sequence>
  44. <xs:element minOccurs="0" maxOccurs="unbounded" name="resource" type="aclResource" />
  45. </xs:sequence>
  46. <xs:attribute name="id" type="typeId" use="required" />
  47. <xs:attribute name="title" type="typeTitle" use="optional" />
  48. <xs:attribute name="translate" type="xs:string" use="optional" />
  49. <xs:attribute name="sortOrder" type="xs:int" use="optional" />
  50. <xs:attribute name="disabled" type="xs:boolean" use="optional" />
  51. </xs:complexType>
  52. <xs:simpleType name="typeId">
  53. <xs:annotation>
  54. <xs:documentation>
  55. Item id attribute can has only [a-z0-9/_]. Minimal length 3 symbol. Case insensitive.
  56. </xs:documentation>
  57. </xs:annotation>
  58. <xs:restriction base="xs:string">
  59. <xs:pattern value="([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}" />
  60. </xs:restriction>
  61. </xs:simpleType>
  62. <xs:simpleType name="typeTitle">
  63. <xs:annotation>
  64. <xs:documentation>
  65. Item title attribute minimal length 3 symbol
  66. </xs:documentation>
  67. </xs:annotation>
  68. <xs:restriction base="xs:string">
  69. <xs:minLength value="3" />
  70. <xs:maxLength value="50" />
  71. </xs:restriction>
  72. </xs:simpleType>
  73. </xs:schema>