Fix accidental deletions, update docstrings...

... and update migration file for rebase.
This commit is contained in:
beeankha 2019-08-19 09:39:11 -04:00 committed by Ryan Petrello
parent 667fce5012
commit aab04bcbb1
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777
3 changed files with 7 additions and 4 deletions

View File

@ -2781,7 +2781,7 @@ class RoleAccess(BaseAccess):
class WorkflowApprovalAccess(BaseAccess):
'''
A user can create an approval template if they are a superuser, an org admin
A user can create an workflow approval if they are a superuser, an org admin
of the org connected to the workflow, or if they are assigned as admins to
the workflow.
@ -2790,6 +2790,8 @@ class WorkflowApprovalAccess(BaseAccess):
- a workflow admin
- an organization admin
- any user who has explicitly been assigned the "approver" role
A user can see approvals if they have read access to the associated WorkflowJobTemplate.
'''
model = WorkflowApproval
@ -2823,7 +2825,9 @@ class WorkflowApprovalTemplateAccess(BaseAccess):
- a superuser
- a workflow admin
- an organization admin
- any user who has explicitly been assigned the "approver" role
- any user who has explicitly been assigned the "approver" role at the workflow or organization level
A user can see approval templates if they have read access to the associated WorkflowJobTemplate.
'''
model = WorkflowApprovalTemplate

View File

@ -8,7 +8,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0083_v360_job_branch_overrirde'),
('main', '0084_v360_token_description'),
]
operations = [

View File

@ -465,7 +465,6 @@ class JobNotificationMixin(object):
from awx.main.tasks import send_notifications # avoid circular import
if status not in ['running', 'succeeded', 'failed']:
raise ValueError(_("status must be either running, succeeded or failed"))
try:
notification_templates = self.get_notification_templates()
except Exception: