-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.schema.json
137 lines (137 loc) · 6.11 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"$schema": "http://json-schema.org/schema#",
"description": "Schema for MGWiki extension configuration parameters.",
"type": "object",
"properties": {
"MGWikiInitialDelayBeforeInactive": {
"type": "number",
"description": "Number of seconds after which an account is considered inactive."
},
"MGWikiForms": {
"type": "object",
"description": "Registration of the semantic forms: target pages, rights, and how to read the values.",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9 ]+$": {
"type": "object",
"description": "Configuration for one specific form.",
"additionalProperties": false,
"required": ["RegexPageName"],
"properties": {
"RegexPageName": {
"type": "string",
"description": "Regular expression (must be understood by PHP, beginning and ending with delimiters) of the target page of the form (see {{{info|page name=}}} in the SemanticForms). Must be normalised with the canonical namespace (in English) if any."
},
"RequiredRight": {
"type": "string",
"description": "Required right to edit the target page (apart for the user edit her/his own userpage if EditOwnUserpage is true); this right should be registered in \"AvailableRights\" in extension.json. No required right if not provided."
},
"InstitutionFromModerator":
"type": "boolean",
"description": "Read the property 'institution' defined for the moderator (defined by the property 'moderator') and apply it to created accounts.",
"default": false
},
"InstitutionFromCreator":
"type": "boolean",
"description": "Read the property 'institution' defined for the account creator and apply it to created accounts.",
"default": false
},
"EditOwnUserpage": {
"type": "boolean",
"description": "Exceptional right for a user editing her/his own userpage if s/he don’t have the required right.",
"default": false
},
"SubObjects": {
"type": "boolean",
"description": "Read subobjects in the form to create users accordingly.",
"default": false
},
"EphemeralPage": {
"type": "boolean",
"description": "Delete the page created just after treatment and redirect to main page.",
"default": false
}
}
}
}
},
"MGWikiFieldsGroups": {
"type": "object",
"description": "Registration of the mappings between semantic properties and MediaWiki groups: rights, groups names, and how to get the right group given criteria.",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9 ]+$": {
"type": "object",
"description": "Name of the semantic property to be synchronised with MediaWiki groups. At least one property between MapFromProperty and MapFromTitle should be provided.",
"additionalProperties": false,
"required": ["Groups"],
"properties": {
"RequiredRight": {
"type": "string",
"description": "Required right to synchronise the the semantic property with MediaWiki groups (apart for the user editing her/his own userpage if EditOwnUserpage is true); without it, and if the user is authorised to edit the page, change this property will have no effect in the MediaWiki groups; this right should be registered in \"AvailableRights\" in extension.json. In addition to this setting, note that for usability matters it would be better to disable the property in SemanticForms itself ({{{field|restricted}}}) to avoid desynchronising data sources. No required right if not provided."
},
"EditOwnUserpage": {
"type": "boolean",
"description": "Exceptional right for a user to synchronise the semantic property on her/his own userpage with MediaWiki groups; without it, and if the user is authorised to edit the page, change this property will have no effect in the MGWiki extension realm.",
"default": false
},
"Groups": {
"type": "array",
"description": "MediaWiki groups which are managed by this semantic property."
},
"MapFromProperty": {
"type": "object",
"description": "Mapping between semantic property values and their corresponding MediaWiki groups.",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9]*$": {
"type": "string",
"description": "Name of the MediaWiki group when the semantic property has the value given by the key."
}
}
},
"MapFromTitle": {
"type": "object",
"description": "Mapping between the target page title and their corresponding MediaWiki groups.",
"additionalProperties": false,
"patternProperties": {
"^[a-zA-Z0-9/$^]+$": {
"type": "string",
"description": "Name of the MediaWiki group when the target page has a title matching the regular expression given by the key."
}
}
}
}
}
}
},
"MGWikiUserProperties": {
"type": "object",
"description": "Mapping between internal identifiers and real semantic property names.",
"additionalProperties": false,
"required": ["email", "firstname", "lastname", "statutPersonne", "statutAdditionnelPersonne"],
"patternProperties": {
"email": {
"type": "string",
"description": "Name of the email property, must be unique accross all semantic forms else they will be unrecongnised."
},
"firstname": {
"type": "string",
"description": "Name of the firstname property, must be unique accross all semantic forms else they will be unrecongnised."
},
"lastname": {
"type": "string",
"description": "Name of the lastname property, must be unique accross all semantic forms else they will be unrecongnised."
},
"statutPersonne": {
"type": "string",
"description": "Name of the 'statutPersonne' property, must be unique accross all semantic forms else they will be unrecongnised."
},
"statutAdditionnelPersonne": {
"type": "string",
"description": "Name of the 'statutAdditionnelPersonne' property, must be unique accross all semantic forms else they will be unrecongnised."
}
}
}
}
}