Skip to content

Commit

Permalink
Revision and versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Jun 24, 2024
1 parent 730b243 commit bf6c9d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sanic-security"
version = "1.12.0"
version = "1.12.1"
requires-python = ">=3.8"
dependencies = [
"tortoise-orm>=0.17.0",
Expand Down
8 changes: 3 additions & 5 deletions sanic_security/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async def fulfill_second_factor(request: Request) -> AuthenticationSession:
return authentication_session


async def authenticate(request: Request) -> tuple[bool, AuthenticationSession]:
async def authenticate(request: Request) -> AuthenticationSession:
"""
Validates client's authentication session and account. New/Refreshed session automatically returned
if expired during authentication, requires encoding.
Expand Down Expand Up @@ -274,7 +274,7 @@ async def create(app, loop):
role = await Role.filter(name="Head Admin").get()
except DoesNotExist:
role = await Role.create(
description="Has the ability to control any aspect of the API, assign sparingly.",
description="Has root abilities, assign sparingly.",
permissions="*:*",
name="Head Admin",
)
Expand All @@ -285,9 +285,7 @@ async def create(app, loop):
await account.fetch_related("roles")
if role not in account.roles:
await account.roles.add(role)
logger.warning(
'The initial admin account role "Head Admin" was removed and has been reinstated.'
)
logger.warning("Initial admin account role has been reinstated.")
except DoesNotExist:
account = await Account.create(
username="Head-Admin",
Expand Down

0 comments on commit bf6c9d1

Please sign in to comment.