Commit | Line | Data |
---|---|---|
8659eb86 | 1 | # ACL Option Package Installation Plugin |
0b768461 | 2 | |
649fb02c MS |
3 | Add customizable permissions for individual objects. |
4 | ||
5 | ## Option Components | |
6 | ||
7 | Each acl option is described as an `<option>` element with the mandatory attribute `name`. | |
8 | ||
9 | ### `<categoryname>` | |
10 | ||
ca3f33cf | 11 | <span class="label label-info">Optional</span> |
649fb02c MS |
12 | |
13 | The name of the acl option category to which the option belongs. | |
14 | ||
15 | ### `<objecttype>` | |
16 | ||
17 | The name of the acl object type (of the object type definition `com.woltlab.wcf.acl`). | |
18 | ||
19 | ||
20 | ## Category Components | |
21 | ||
22 | Each acl option category is described as an `<category>` element with the mandatory attribute `name` that should follow the naming pattern `<permissionName>` or `<permissionType>.<permissionName>`, with `<permissionType>` generally having `user` or `mod` as value. | |
23 | ||
24 | ### `<objecttype>` | |
25 | ||
26 | The name of the acl object type (of the object type definition `com.woltlab.wcf.acl`). | |
27 | ||
28 | ||
29 | ## Example | |
30 | ||
31 | ```xml | |
32 | <?xml version="1.0" encoding="UTF-8"?> | |
38ab2b9e | 33 | <data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/aclOption.xsd"> |
649fb02c MS |
34 | <import> |
35 | <categories> | |
36 | <category name="user.example"> | |
37 | <objecttype>com.example.wcf.example</objecttype> | |
38 | </category> | |
39 | <category name="mod.example"> | |
40 | <objecttype>com.example.wcf.example</objecttype> | |
41 | </category> | |
42 | </categories> | |
43 | ||
44 | <options> | |
45 | <option name="canAddExample"> | |
46 | <categoryname>user.example</categoryname> | |
47 | <objecttype>com.example.wcf.example</objecttype> | |
48 | </option> | |
49 | <option name="canDeleteExample"> | |
50 | <categoryname>mod.example</categoryname> | |
51 | <objecttype>com.example.wcf.example</objecttype> | |
52 | </option> | |
53 | </options> | |
54 | </import> | |
55 | ||
56 | <delete> | |
57 | <optioncategory name="old.example"> | |
58 | <objecttype>com.example.wcf.example</objecttype> | |
59 | </optioncategory> | |
60 | <option name="canDoSomethingWithExample"> | |
61 | <objecttype>com.example.wcf.example</objecttype> | |
62 | </option> | |
63 | </delete> | |
64 | </data> | |
65 | ``` |