forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-61789-master' of https://github.com/meirzamoodle/mo…
- Loading branch information
Showing
9 changed files
with
348 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@tool @tool_oauth2 @javascript | ||
|
||
Feature: OAuth2 user profile fields functionality | ||
In order to use them later for authentication or repository plugins | ||
As an administrator | ||
I need to be able to map data fields provided by an Oauth2 provider | ||
to custom user profile fields defined by an administrator. | ||
|
||
Background: | ||
Given the following "custom profile fields" exist: | ||
| datatype | shortname | name | locked | | ||
| text | unlocked_field | Unlocked field | 0 | | ||
| text | locked_field | Locked field | 1 | | ||
And I log in as "admin" | ||
And I navigate to "Server > OAuth 2 services" in site administration | ||
|
||
Scenario: Verify custom user profile field mapping | ||
Given I press "Microsoft" | ||
And I should see "Create new service: Microsoft" | ||
And I set the following fields to these values: | ||
| Name | Testing service | | ||
| Client ID | thisistheclientid | | ||
| Client secret | supersecret | | ||
When I press "Save changes" | ||
Then I should see "Changes saved" | ||
And I should see "Testing service" | ||
And I click on "Configure user field mappings" "link" in the "Testing service" "table_row" | ||
|
||
# Create unlocked field | ||
And I click on "Create new user field mapping for issuer \"Testing service\"" "button" | ||
And I set the following fields to these values: | ||
| External field name | External unlocked | | ||
| Internal field name | Unlocked field | | ||
And I click on "Save changes" "button" | ||
And I should see "unlocked_field" | ||
|
||
# Create locked field | ||
And I click on "Create new user field mapping for issuer \"Testing service\"" "button" | ||
And I set the following fields to these values: | ||
| External field name | External locked | | ||
| Internal field name | Locked field | | ||
And I click on "Save changes" "button" | ||
And I should see "locked_field" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.