[Authentication] Some of the base class functions are not static

function, but - methods. Hence - 'self' should be used, and not 'cls'.

Also - use a constant for duplicate string literal in LDAP
authentication implementation.
This commit is contained in:
Ashesh Vashi
2020-04-08 18:35:45 +05:30
parent d226ffbd1f
commit 414e336852
2 changed files with 18 additions and 15 deletions

View File

@@ -30,11 +30,11 @@ class BaseAuthentication(object):
}
@abstractproperty
def get_friendly_name(cls):
def get_friendly_name(self):
pass
@abstractmethod
def authenticate(cls):
def authenticate(self):
pass
def validate(self, form):
@@ -80,7 +80,7 @@ class BaseAuthentication(object):
class InternalAuthentication(BaseAuthentication):
def get_friendly_name(cls):
def get_friendly_name(self):
return gettext("internal")
def validate(self, form):