Skip to content

Commit

Permalink
Enable social auth users to see other users.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Oct 13, 2023
1 parent 82fde17 commit 1d7ced9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions galaxy_ng/app/access_control/statements/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@
"action": ["list"],
"principal": "authenticated",
"effect": "allow",
"condition": "has_model_perms:galaxy.view_user"
# "condition": "has_model_perms:galaxy.view_user"
},
{
"action": ["retrieve"],
"principal": "authenticated",
"effect": "allow",
"condition": "has_model_perms:galaxy.view_user"
# "condition": "has_model_perms:galaxy.view_user"
},
{
"action": "destroy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1d7ced9

Please sign in to comment.