Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@tool @tool_dataprivacyFeature: Data delete from the privacy APIIn order to delete data for users and meet legal requirementsAs an admin, user, or parentI need to be able to request a user and their data data be deletedBackground:Given the following "users" exist:| username | firstname | lastname || victim | Victim User | 1 || parent | Long-suffering | Parent || privacyofficer | Privacy Officer | One |And the following "roles" exist:| shortname | name | archetype || tired | Tired | |And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:makedatarequestsforchildren | Allow | tired | System | || tool/dataprivacy:makedatadeletionrequestsforchildren | Allow | tired | System | || tool/dataprivacy:managedatarequests | Allow | manager | System | |And the following "role assigns" exist:| user | role | contextlevel | reference || parent | tired | User | victim |And the following "system role assigns" exist:| user | role | contextlevel || privacyofficer | manager | User |And the following config values are set as admin:| contactdataprotectionofficer | 1 | tool_dataprivacy |And the following data privacy "categories" exist:| name || Site category |And the following data privacy "purposes" exist:| name | retentionperiod || Site purpose | P10Y |And the following config values are set as admin:| contactdataprotectionofficer | 1 | tool_dataprivacy || privacyrequestexpiry | 55 | tool_dataprivacy || dporoles | 1 | tool_dataprivacy |And I set the site category and purpose to "Site category" and "Site purpose"@javascriptScenario: As admin, delete a user and their dataGiven I log in as "victim"And I should see "Victim User 1"And I log outAnd I log in as "admin"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I follow "New request"And I set the field "User" to "Victim User 1"And I set the field "Type" to "Delete all of my personal data"And I press "Save changes"Then I should see "Victim User 1"And I should see "Awaiting approval" in the "Victim User 1" "table_row"And I open the action menu in "Victim User 1" "table_row"And I follow "Approve request"And I press "Approve request"And I should see "Approved" in the "Victim User 1" "table_row"And I run all adhoc tasksAnd I reload the pageAnd I should see "Deleted" in the "Victim User 1" "table_row"And I log outAnd I log in as "victim"And I should see "Invalid login"@javascriptScenario: As a student, request deletion of account and dataGiven I log in as "victim"And I follow "Profile" in the user menuAnd I follow "Data requests"And I follow "New request"And I set the field "Type" to "Delete all of my personal data"And I press "Save changes"Then I should see "Delete all of my personal data"And I should see "Awaiting approval" in the "Delete all of my personal data" "table_row"And I log outAnd I log in as "admin"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I open the action menu in "Victim User 1" "table_row"And I follow "Approve request"And I press "Approve request"And I log outAnd I log in as "victim"And I follow "Profile" in the user menuAnd I follow "Data requests"And I should see "Approved" in the "Delete all of my personal data" "table_row"And I run all adhoc tasksAnd I reload the pageAnd I should see "Your session has timed out"And I log in as "victim"And I should see "Invalid login"And I log in as "admin"And I am on site homepageAnd I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I should see "Deleted"@javascriptScenario: As a parent, request account and data deletion for my childGiven I log in as "parent"And I follow "Profile" in the user menuAnd I follow "Data requests"And I follow "New request"And I set the field "User" to "Victim User 1"And I set the field "Type" to "Delete all of my personal data"And I press "Save changes"Then I should see "Victim User 1"And I should see "Awaiting approval" in the "Victim User 1" "table_row"And I log outAnd I log in as "admin"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I open the action menu in "Victim User 1" "table_row"And I follow "Approve request"And I press "Approve request"And I log outAnd I log in as "parent"And I follow "Profile" in the user menuAnd I follow "Data requests"And I should see "Approved" in the "Victim User 1" "table_row"And I run all adhoc tasksAnd I reload the pageAnd I should see "You don't have any personal data requests"@javascriptScenario: As a Privacy Officer, I cannot create data deletion request unless I have permission.Given I log in as "privacyofficer"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I follow "New request"And I open the autocomplete suggestions listAnd I click on "Victim User 1" item in the autocomplete listThen I should see "Export all of my personal data"And "Type" "select" should not be visibleAnd the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdeleteforotheruser | Allow | manager | System | |And I reload the pageAnd I open the autocomplete suggestions listAnd I click on "Victim User 1" item in the autocomplete listAnd "Type" "select" should be visible@javascriptScenario: As a student, I cannot create data deletion request unless I have permission.Given I log in as "victim"And I follow "Profile" in the user menuAnd I follow "Data requests"And I follow "New request"Then "Type" "select" should existAnd the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdelete | Prevent | user | System | |And I reload the pageAnd I should see "Export all of my personal data"And "Type" "select" should not exist@javascriptScenario: As a parent, I cannot create data deletion request unless I have permission.Given I log in as "parent"And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:makedatadeletionrequestsforchildren | Prevent | tired | System | victim |And I follow "Profile" in the user menuAnd I follow "Data requests"And I follow "New request"And I open the autocomplete suggestions listAnd I click on "Victim User 1" item in the autocomplete listAnd I set the field "Type" to "Delete all of my personal data"And I press "Save changes"And I should see "You don't have permission to create deletion request for this user."And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:makedatadeletionrequestsforchildren | Allow | tired | System | victim || tool/dataprivacy:requestdelete | Prevent | user | System | |And I open the autocomplete suggestions listAnd I click on "Long-suffering Parent" item in the autocomplete listAnd I press "Save changes"And I should see "You don't have permission to create deletion request for yourself."@javascriptScenario: As a student, link to create data deletion should not be shown if I don't have permission.Given the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdelete | Prohibit | user | System | |When I log in as "victim"And I follow "Profile" in the user menuThen I should not see "Delete my account"@javascriptScenario: As a primary admin, the link to create a data deletion request should not be shown.Given I log in as "admin"When I follow "Profile" in the user menuThen I should not see "Delete my account"@javascriptScenario: As a Privacy Officer, I cannot Approve to Deny deletion data request without permission.Given the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdeleteforotheruser | Allow | manager | System | |When I log in as "privacyofficer"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I follow "New request"And I open the autocomplete suggestions listAnd I click on "Victim User 1" item in the autocomplete listAnd I set the field "Type" to "Delete all of my personal data"And I press "Save changes"And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdeleteforotheruser | Prohibit | manager | System | |And I reload the pageThen ".selectrequests" "css_element" should not existAnd I open the action menu in "region-main" "region"And I should not see "Approve request"And I should not see "Deny request"And I choose "View the request" in the open action menuAnd "Approve" "button" should not existAnd "Deny" "button" should not exist@javascriptScenario: As a Privacy Officer, I cannot re-submit deletion data request without permission.Given the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdeleteforotheruser | Allow | manager | System | |When I log in as "privacyofficer"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I follow "New request"And I open the autocomplete suggestions listAnd I click on "Victim User 1" item in the autocomplete listAnd I set the field "Type" to "Delete all of my personal data"And I press "Save changes"And I open the action menu in "region-main" "region"And I follow "Deny request"And I press "Deny request"And the following "permission overrides" exist:| capability | permission | role | contextlevel | reference || tool/dataprivacy:requestdeleteforotheruser | Prohibit | manager | System | |And I reload the pageAnd I open the action menu in "region-main" "region"Then I should not see "Resubmit as new request"Scenario: Request data deletion as student with automatic approval turned onGiven the following config values are set as admin:| automaticdatadeletionapproval | 1 | tool_dataprivacy |And I log in as "victim"And I follow "Profile" in the user menuAnd I follow "Delete my account"When I press "Save changes"Then I should see "Your request has been submitted and will be processed soon."And I should see "Approved" in the "Delete all of my personal data" "table_row"@javascriptScenario: Delete flow stay the same even allow filtering of exports by course setting is enabled.Given the following config values are set as admin:| allowfiltering | 1 | tool_dataprivacy |And I log in as "victim"And I should see "Victim User 1"And I log outAnd I log in as "admin"And I navigate to "Users > Privacy and policies > Data requests" in site administrationAnd I follow "New request"And I set the field "User" to "Victim User 1"And I set the field "Type" to "Delete all of my personal data"And I press "Save changes"Then I should see "Victim User 1"And I should see "Awaiting approval" in the "Victim User 1" "table_row"And I open the action menu in "Victim User 1" "table_row"And I follow "Approve request"And I press "Approve request"And I should see "Approved" in the "Victim User 1" "table_row"And I run all adhoc tasksAnd I reload the pageAnd I should see "Deleted" in the "Victim User 1" "table_row"And I log outAnd I log in as "victim"And I should see "Invalid login"