-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable social auth users to see other users.
No-Issue Signed-off-by: James Tanner <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 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 |
---|---|---|
|
@@ -570,3 +570,28 @@ def test_community_social_v3_namespace_sorting(ansible_config): | |
# https://issues.redhat.com/browse/AAH-2729 | ||
# social auth code was trying to sort namespaces ... | ||
pass | ||
|
||
|
||
@pytest.mark.deployment_community | ||
def test_social_auth_access_api_ui_v1_users(ansible_config): | ||
# https://issues.redhat.com/browse/AAH-2781 | ||
|
||
username = "foo1234" | ||
default_cfg = extract_default_config(ansible_config) | ||
|
||
ga = GithubAdminClient() | ||
ga.delete_user(login=username) | ||
|
||
user_c = ga.create_user(login=username, email="[email protected]") | ||
user_c.update(default_cfg) | ||
user_c['username'] = username | ||
|
||
with SocialGithubClient(config=user_c) as client: | ||
users_resp = client.get('_ui/v1/users/') | ||
assert users_resp.status_code == 200 | ||
|
||
# try to fetch each user .. | ||
for udata in users_resp.json()['data']: | ||
uid = udata['id'] | ||
user_resp = client.get(f'_ui/v1/users/{uid}/') | ||
assert user_resp.status_code == 200 |