Skip to content

Commit

Permalink
Fixes authorization check
Browse files Browse the repository at this point in the history
  • Loading branch information
vmesel committed May 29, 2024
1 parent edbb1c9 commit cf00064
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fastsupabased_acl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, role: List[str] = ["authenticated"]):
self.role = role

def __call__(self, user = Depends(token_auth)):
if self.role != user.user.role:
if self.role not in user.user.role:
raise HTTPException(status_code=403, detail="Unauthorized")

return user
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fastsupabased-acl"
version = "0.1.2"
version = "0.1.3"
description = "FastAPI Dependency for Supabase-based ACL using Supabase Roles"
authors = ["Vinicius Mesel <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit cf00064

Please sign in to comment.