Skip to content

Commit

Permalink
fix regex inversed
Browse files Browse the repository at this point in the history
  • Loading branch information
mstingl committed Nov 4, 2023
1 parent d0bfb46 commit 011eb01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion djfapi/security/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def __call__(self, request: Request, scopes: SecurityScopes) -> Optional[A

class JWTTokenDjangoPermissions(JWTToken):
DJANGO_PERMISSION_REGEX = (
r"^(?P<service>[_\w]+)\.(?P<action>[^a-zA-Z0-9]+)_(?P<resource>[^a-zA-Z0-9]+)(_(?P<selector>.*))?$"
r"^(?P<service>[_\w]+)\.(?P<action>[a-zA-Z0-9]+)_(?P<resource>[a-zA-Z0-9]+)(_(?P<selector>.*))?$"
)
DJANGO_PERMISSION_ACTION_TO_CRUD = {
'add': 'create',
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = djfapi
version = 0.0.72b3
version = 0.0.72b4
author = Manuel Stingl
author_email = opensource@voltane.eu
description = Utilities for use with FastAPI and django
Expand Down

0 comments on commit 011eb01

Please sign in to comment.