-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTODO
74 lines (50 loc) · 1.74 KB
/
TODO
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
There are many experiments,
each experiemnts has a scope and conditions
each condition has a st of actions
Each condition is checked based on the scope
- request is checked once very early (new hook?) and temp saved into $CFG
- session is checked once after after_require_login and the result is saved into the session
All of this will be stored into whatever db data model we want, but once it is changed I want to bake that into a $CFG->
var so that we can use this very early in the moodle bootstrap and without incurring another db call or muc call.
So I'd just serialize the data into json and jam it into the var, this also gives us an easy way of forcing it via config.php too
{
name: 'xsendfile experiment 1',
shortname: 'xsendfile1',
scope: 'request',
conditions: [
{
value: 60 // 60% hit this
ipwhiteist: '123.123.123/256'
set: [
{
plugin: 'core',
name: 'foo',
value: 'bar
}
{
plugin: 'auth_saml2', // this works by temp copying into forced_plugin_settings
name: 'foo'
value: 'bar'
}
]
},
{
value: 20 // 20% hit this
}
]
}
name - eg Test xsendfile
shortname = 'xsendfile' (this becomes the param name)
scope: param only, request, session, host?
enabled - on
condition(s)
- value 's3' (if param = s3 then force on)
- 60% - 60% of the time this will fire
- value sets, (can be more than 1)
- $CFG->foo = 'bar', on plugin config
- if there is more than 1 condition, the % must total <= 100%
security
doesn't apply to admin user in this session, in case you frig something and need to disable
test mode, query param to force it to apply
cannot override forced config
blacklist, maint mode