MDL-72187 logstore: record log store's visibility change
This commit is contained in:
committed by
Andrew Nicols
parent
36ef1de379
commit
e8bdb79b95
@@ -50,6 +50,7 @@ switch ($action) {
|
||||
case 'disable':
|
||||
unset($enabled[$enrol]);
|
||||
set_config('enabled_stores', implode(',', array_keys($enabled)), 'tool_log');
|
||||
add_to_config_log('tool_logstore_visibility', '1', '0', $enrol);
|
||||
break;
|
||||
|
||||
case 'enable':
|
||||
@@ -59,6 +60,7 @@ switch ($action) {
|
||||
$enabled = array_keys($enabled);
|
||||
$enabled[] = $enrol;
|
||||
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
|
||||
add_to_config_log('tool_logstore_visibility', '0', '1', $enrol);
|
||||
break;
|
||||
|
||||
case 'up':
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
@tool_log @report @report_configlog
|
||||
Feature: In a report, admin can see logstore visibility changes
|
||||
|
||||
# Change log stores visibility so the report contains known data.
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And the following config values are set as admin:
|
||||
| enabled_stores | logstore_standard | tool_log |
|
||||
|
||||
@javascript
|
||||
Scenario: Display configuration changes report
|
||||
When I navigate to "Plugins > Logging > Manage log stores" in site administration
|
||||
And I click on "Disable" "icon" in the "Standard log" "table_row"
|
||||
And I click on "Enable" "icon" in the "External database log" "table_row"
|
||||
And I navigate to "Reports > Config changes" in site administration
|
||||
Then the following should exist in the "report-configlog-report-table" table:
|
||||
| User | Plugin | Setting | New value | Original value |
|
||||
| Admin User | logstore_standard | tool_logstore_visibility | 0 | 1 |
|
||||
| Admin User | logstore_database | tool_logstore_visibility | 1 | 0 |
|
||||
Reference in New Issue
Block a user