0008-misc-fix-bad-classmethod-argument-pylint-error-56982.patch
src/authentic2/apps/journal/models.py | ||
---|---|---|
107 | 107 |
return _registry.get(name) |
108 | 108 | |
109 | 109 |
@classmethod |
110 |
def search_by_name(self, name):
|
|
110 |
def search_by_name(cls, name):
|
|
111 | 111 |
for evd_name, evd in _registry.items(): |
112 | 112 |
if name in evd_name: |
113 | 113 |
yield evd |
114 | 114 | |
115 | 115 |
@classmethod |
116 |
def get_message(self, event, context=None):
|
|
117 |
return self.label
|
|
116 |
def get_message(cls, event, context=None):
|
|
117 |
return cls.label
|
|
118 | 118 | |
119 | 119 |
@classmethod |
120 | 120 |
def get_statistics( |
src/authentic2/backends/ldap_backend.py | ||
---|---|---|
876 | 876 |
return None |
877 | 877 | |
878 | 878 |
@classmethod |
879 |
def _parse_simple_config(self):
|
|
879 |
def _parse_simple_config(cls):
|
|
880 | 880 |
if len(settings.LDAP_AUTH_SETTINGS) < 2: |
881 | 881 |
raise ImproperlyConfigured( |
882 | 882 |
'In a minimal configuration, you must at least specify url and user DN' |
src/authentic2/journal_event_types.py | ||
---|---|---|
37 | 37 |
super().record(user=user, session=session, references=references, data=data) |
38 | 38 | |
39 | 39 |
@classmethod |
40 |
def get_service_name(self, event):
|
|
40 |
def get_service_name(cls, event):
|
|
41 | 41 |
(service,) = event.get_typed_references(Service) |
42 | 42 |
if service is not None: |
43 | 43 |
return str(service) |
src/authentic2/manager/journal_event_types.py | ||
---|---|---|
300 | 300 | |
301 | 301 |
class RoleEventsMixin(EventTypeDefinition): |
302 | 302 |
@classmethod |
303 |
def record(self, user, role, session=None, references=None, data=None, api=False):
|
|
303 |
def record(cls, user, role, session=None, references=None, data=None, api=False):
|
|
304 | 304 |
references = references or [] |
305 | 305 |
references = [role] + references |
306 | 306 |
data = data or {} |
src/authentic2/manager/user_export.py | ||
---|---|---|
87 | 87 |
self.progress_path = os.path.join(self.path, 'progress') |
88 | 88 | |
89 | 89 |
@classmethod |
90 |
def base_path(self):
|
|
90 |
def base_path(cls):
|
|
91 | 91 |
path = default_storage.path('user_exports') |
92 | 92 |
if not os.path.exists(path): |
93 | 93 |
os.makedirs(path) |
src/authentic2/manager/user_import.py | ||
---|---|---|
78 | 78 |
pickle.dump(self.meta, fd) |
79 | 79 | |
80 | 80 |
@classmethod |
81 |
def base_path(self):
|
|
81 |
def base_path(cls):
|
|
82 | 82 |
path = default_storage.path('user_imports') |
83 | 83 |
if not os.path.exists(path): |
84 | 84 |
os.makedirs(path) |
src/authentic2/manager/user_views.py | ||
---|---|---|
414 | 414 |
return form |
415 | 415 | |
416 | 416 |
@classmethod |
417 |
def has_perm_on_roles(self, user, instance):
|
|
417 |
def has_perm_on_roles(cls, user, instance):
|
|
418 | 418 |
role_qs = get_role_model().objects.all() |
419 | 419 |
if app_settings.ROLE_MEMBERS_FROM_OU and instance.ou: |
420 | 420 |
role_qs = role_qs.filter(ou=instance.ou) |
421 |
- |