Skip to content

Commit 75777a2

Browse files
Apply new "write:principals" scope protection
1 parent 447ec73 commit 75777a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tiled/authn_database/migrations/versions/769180ce732e_add_write_principals_scope_to_admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
def upgrade():
2424
"""
25-
Add 'write:principal' scope to default 'admin' Role.
25+
Add 'write:principals' scope to default 'admin' Role.
2626
"""
2727
connection = op.get_bind()
2828
with Session(bind=connection) as db:

tiled/server/authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ async def principal_list(
830830
)
831831
async def create_service_principal(
832832
request: Request,
833-
principal=Security(get_current_principal, scopes=["read:principals"]),
833+
principal=Security(get_current_principal, scopes=["write:principals"]),
834834
db=Depends(get_database_session),
835835
role: str = Query(...),
836836
):

0 commit comments

Comments
 (0)