File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,12 +224,8 @@ async def __call__(
224224 AuthSubject [Anonymous | User ], Depends (_WebUserOrAnonymous )
225225]
226226
227- _WebUserRead = Authenticator (
228- allowed_subjects = {User }, required_scopes = None
229- )
227+ _WebUserRead = Authenticator (allowed_subjects = {User }, required_scopes = None )
230228WebUserRead = Annotated [AuthSubject [User ], Depends (_WebUserRead )]
231229
232- _WebUserWrite = Authenticator (
233- allowed_subjects = {User }, required_scopes = None
234- )
230+ _WebUserWrite = Authenticator (allowed_subjects = {User }, required_scopes = None )
235231WebUserWrite = Annotated [AuthSubject [User ], Depends (_WebUserWrite )]
Original file line number Diff line number Diff line change @@ -39,24 +39,17 @@ def _try_parse_uuid(self, query: str) -> uuid.UUID | None:
3939 return None
4040
4141 def _has_products_scope (self , auth_subject : AuthSubject [User ]) -> bool :
42- return bool (
43- auth_subject .scopes
44- & {Scope .products_read , Scope .products_write }
45- )
42+ return bool (auth_subject .scopes & {Scope .products_read , Scope .products_write })
4643
4744 def _has_customers_scope (self , auth_subject : AuthSubject [User ]) -> bool :
48- return bool (
49- auth_subject .scopes
50- & {Scope .customers_read , Scope .customers_write }
51- )
45+ return bool (auth_subject .scopes & {Scope .customers_read , Scope .customers_write })
5246
5347 def _has_orders_scope (self , auth_subject : AuthSubject [User ]) -> bool :
5448 return bool (auth_subject .scopes & {Scope .orders_read , Scope .orders_write })
5549
5650 def _has_subscriptions_scope (self , auth_subject : AuthSubject [User ]) -> bool :
5751 return bool (
58- auth_subject .scopes
59- & {Scope .subscriptions_read , Scope .subscriptions_write }
52+ auth_subject .scopes & {Scope .subscriptions_read , Scope .subscriptions_write }
6053 )
6154
6255 async def search (
You can’t perform that action at this time.
0 commit comments