mirror of
https://github.com/ansible/awx.git
synced 2026-06-26 08:58:03 -02:30
Cleaned up some more stale TODO's and FIXME's (or did / fixed the things)
This commit is contained in:
@@ -880,7 +880,6 @@ class JobTemplateAccess(BaseAccess):
|
||||
|
||||
team_ids = Team.objects.filter(deprecated_users__in=[self.user])
|
||||
|
||||
# TODO: I think the below queries can be combined
|
||||
deploy_permissions_ids = Permission.objects.filter(
|
||||
Q(user=self.user) | Q(team_id__in=team_ids),
|
||||
permission_type__in=allowed_deploy,
|
||||
@@ -1094,7 +1093,6 @@ class JobAccess(BaseAccess):
|
||||
allowed_check = [PERM_JOBTEMPLATE_CREATE, PERM_INVENTORY_DEPLOY, PERM_INVENTORY_CHECK]
|
||||
team_ids = Team.objects.filter(deprecated_users__in=[self.user])
|
||||
|
||||
# TODO: I think the below queries can be combined
|
||||
deploy_permissions_ids = Permission.objects.filter(
|
||||
Q(user=self.user) | Q(team__in=team_ids),
|
||||
permission_type__in=allowed_deploy,
|
||||
|
||||
@@ -29,12 +29,10 @@ class UriCleaner(object):
|
||||
username = o.username
|
||||
password = o.password
|
||||
|
||||
# Given a python MatchObject, with respect to redactedtext, find and
|
||||
# Given a python MatchObject, with respect to redactedtext, find and
|
||||
# replace the first occurance of username and the first and second
|
||||
# occurance of password
|
||||
|
||||
# TODO: Ideally, we would replace username and password using the index
|
||||
# that they were found at.
|
||||
uri_str = redactedtext[match.start():match.end()]
|
||||
if username:
|
||||
uri_str = uri_str.replace(username, UriCleaner.REPLACE_STR, 1)
|
||||
|
||||
@@ -322,7 +322,6 @@ def activity_stream_create(sender, instance, created, **kwargs):
|
||||
# Skip recording any inventory source directly associated with a group.
|
||||
if isinstance(instance, InventorySource) and instance.group:
|
||||
return
|
||||
# TODO: Rethink details of the new instance
|
||||
object1 = camelcase_to_underscore(instance.__class__.__name__)
|
||||
changes = model_to_dict(instance, model_serializer_mapping)
|
||||
# Special case where Job survey password variables need to be hidden
|
||||
|
||||
@@ -142,8 +142,8 @@ def tower_periodic_scheduler(self):
|
||||
try:
|
||||
last_run = dateutil.parser.parse(fd.read())
|
||||
return last_run
|
||||
except Exception:
|
||||
#TODO: LOG
|
||||
except Exception as exc:
|
||||
logger.error("get_last_run failed: {}".format(exc))
|
||||
return None
|
||||
|
||||
def write_last_run(last_run):
|
||||
|
||||
Reference in New Issue
Block a user