Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/728.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update tests to grant MAS users with access to the Synapse admin API when requested.
4 changes: 3 additions & 1 deletion tests/integration/lib/matrix_authentication_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def create_mas_user(
pytestconfig: pytest.Config,
) -> str:
"""
Create the user and return their user id
Create the user and return their access token
"""
cached_user_token = pytestconfig.cache.get(f"ess-helm/cached-tokens/{username}", None)
if cached_user_token:
Expand Down Expand Up @@ -101,6 +101,8 @@ async def create_mas_user(
scopes = [
"urn:matrix:org.matrix.msc2967.client:api:*",
]
if admin:
scopes.append("urn:synapse:admin:*")
add_access_token_data = {
"query": create_session_mutation,
"variables": {"userId": graphql_user_id, "scope": " ".join(scopes)},
Expand Down
Loading