mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
auth: add several AnonymousUser method stubs
We'll need to use these, so this commit implements them here with tests for coverage. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
c006386079
commit
741cbfaa4e
2 changed files with 46 additions and 1 deletions
|
@ -53,10 +53,30 @@ class AnonymousUser:
|
|||
def is_authenticated():
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def is_trusted_user():
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def is_developer():
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def is_elevated():
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def has_credential(credential):
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def voted_for(package):
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def notified(package):
|
||||
return False
|
||||
|
||||
|
||||
class BasicAuthBackend(AuthenticationBackend):
|
||||
async def authenticate(self, conn: HTTPConnection):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue