0033-misc-fix-no-else-continue-pylint-error-56982.patch
src/authentic2/a2_rbac/management.py | ||
---|---|---|
48 | 48 |
if app_settings.MANAGED_CONTENT_TYPES == (): |
49 | 49 |
Role.objects.filter(slug=ou_slug, ou=ou).delete() |
50 | 50 |
continue |
51 |
else: |
|
52 |
ou_ct_admin_role = Role.objects.get_admin_role( |
|
53 |
instance=ct, ou=ou, name=name, slug=ou_slug, update_slug=True, update_name=True |
|
54 |
) |
|
51 |
ou_ct_admin_role = Role.objects.get_admin_role( |
|
52 |
instance=ct, ou=ou, name=name, slug=ou_slug, update_slug=True, update_name=True |
|
53 |
) |
|
55 | 54 |
if not app_settings.MANAGED_CONTENT_TYPES or key in app_settings.MANAGED_CONTENT_TYPES: |
56 | 55 |
ou_ct_admin_role.add_child(ou_admin_role) |
57 | 56 |
else: |
src/authentic2/idp/saml/saml2_endpoints.py | ||
---|---|---|
1312 | 1312 |
if not p: |
1313 | 1313 |
logger.debug('slo cannot logout provider %s, it is no more known.', lib_session.provider_id) |
1314 | 1314 |
continue |
1315 |
else: |
|
1316 |
logger.debug('provider %s loaded', p) |
|
1317 |
policy = get_sp_options_policy(p) |
|
1318 |
if not policy: |
|
1319 |
logger.warning('No policy found for %s', lib_session.provider_id) |
|
1320 |
elif not policy.forward_slo: |
|
1321 |
logger.debug('%s configured not to receive slo', lib_session.provider_id) |
|
1322 |
if not policy or not policy.forward_slo: |
|
1323 |
lib_sessions.remove(lib_session) |
|
1315 |
logger.debug('provider %s loaded', p) |
|
1316 |
policy = get_sp_options_policy(p) |
|
1317 |
if not policy: |
|
1318 |
logger.warning('No policy found for %s', lib_session.provider_id) |
|
1319 |
elif not policy.forward_slo: |
|
1320 |
logger.debug('%s configured not to receive slo', lib_session.provider_id) |
|
1321 |
if not policy or not policy.forward_slo: |
|
1322 |
lib_sessions.remove(lib_session) |
|
1324 | 1323 |
set_session_dump_from_liberty_sessions(logout, found[0:1] + lib_sessions) |
1325 | 1324 |
try: |
1326 | 1325 |
logout.validateRequest() |
src/authentic2/manager/views.py | ||
---|---|---|
646 | 646 |
permission = entry.get('permission') |
647 | 647 |
if permission == 'superuser' and not self.request.user.is_superuser: |
648 | 648 |
continue |
649 |
elif permission and not self.request.user.has_perm_any(permission):
|
|
649 |
if permission and not self.request.user.has_perm_any(permission): |
|
650 | 650 |
continue |
651 | 651 |
entries.append(entry) |
652 | 652 |
# use possible key order to sort |
src/authentic2/utils/misc.py | ||
---|---|---|
336 | 336 |
for key, value in append.items(): |
337 | 337 |
if value is None: |
338 | 338 |
continue |
339 |
elif isinstance(value, (tuple, list)):
|
|
339 |
if isinstance(value, (tuple, list)): |
|
340 | 340 |
url_params.extend({key: value}) |
341 | 341 |
else: |
342 | 342 |
url_params.appendlist(key, value) |
src/django_rbac/backends.py | ||
---|---|---|
154 | 154 |
for key, value in cache.items(): |
155 | 155 |
if isinstance(value, bool): |
156 | 156 |
continue |
157 |
elif key == '__all__':
|
|
157 |
if key == '__all__': |
|
158 | 158 |
continue |
159 |
elif key.startswith('ou.'):
|
|
159 |
if key.startswith('ou.'): |
|
160 | 160 |
if perm_or_perms & value: |
161 | 161 |
return True |
162 | 162 |
elif perm_or_perms & value: |
... | ... | |
187 | 187 |
for key, value in cache.items(): |
188 | 188 |
if isinstance(value, bool): |
189 | 189 |
continue |
190 |
elif key == '__all__':
|
|
190 |
if key == '__all__': |
|
191 | 191 |
continue |
192 |
elif key.startswith('ou.'):
|
|
192 |
if key.startswith('ou.'): |
|
193 | 193 |
if has_ou_field and perm_or_perms & value: |
194 | 194 |
q.append(Q(ou_id=int(key[3:]))) |
195 | 195 |
continue |
196 |
- |