mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-72464 webservice: fix detection of non-expiring external tokens.
This commit is contained in:
parent
e746dc75af
commit
797cff78d5
4 changed files with 76 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
@core @core_user
|
||||
Feature: Enable/disable password field based on authentication selected.
|
||||
Feature: Edit a users password
|
||||
In order edit a user password properly
|
||||
As an admin
|
||||
I need to be able to notice if the change in password is allowed by athuentication plugin or not
|
||||
I need to be able to edit their profile and change their password
|
||||
|
||||
@javascript
|
||||
Scenario: Verify the password field is enabled/disabled based on authentication selected, in user edit advanced page.
|
||||
|
@ -15,3 +15,34 @@ Feature: Enable/disable password field based on authentication selected.
|
|||
And the "New password" "field" should be enabled
|
||||
# We need to cancel/submit a form that has been modified.
|
||||
And I press "Create user"
|
||||
|
||||
Scenario: Sign out everywhere field is not present if user doesn't have active token
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| user01 | User | One | user01@example.com |
|
||||
And I log in as "admin"
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I click on "User One" "link" in the "users" "table"
|
||||
And I click on "Edit profile" "link"
|
||||
Then "Sign out everywhere" "field" should not exist
|
||||
|
||||
Scenario Outline: Sign out everywhere field is present based on expiry of active token
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| user01 | User | One | user01@example.com |
|
||||
And the following "core_webservice > Service" exist:
|
||||
| shortname | name |
|
||||
| mytestservice | My test service |
|
||||
And the following "core_webservice > Tokens" exist:
|
||||
| user | service | validuntil |
|
||||
| user01 | mytestservice | <validuntil> |
|
||||
And I log in as "admin"
|
||||
When I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I click on "User One" "link" in the "users" "table"
|
||||
And I click on "Edit profile" "link"
|
||||
Then "Sign out everywhere" "field" <shouldornot> exist
|
||||
Examples:
|
||||
| validuntil | shouldornot |
|
||||
| ## -1 month ## | should not |
|
||||
| 0 | should |
|
||||
| ## +1 month ## | should |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue