Commit c3c352f7 authored by dennisjl's avatar dennisjl
Browse files

changes line for editor limit and consistency

parent 6ac6db8c
Pipeline #79952 passed with stage
in 1 minute and 9 seconds
......@@ -58,8 +58,11 @@ def send_project_email(people, project, request, current_site):
mail.EmailMessage(
"New Project: " + project.title ,
"A new project you might be interested in was created and can be viwed at "
+ current_site.domain + '/projects/' + str(project.id),
"Agreelancer", [person.user.email],
+ current_site.domain
+ '/projects/'
+ str(project.id),
"Agreelancer",
[person.user.email],
connection=connection,
).send()
except Exception as e:
......@@ -211,14 +214,28 @@ def get_user_task_permissions(user, task):
'view_task': False,
'upload': False,
}
user_permissions['read'] = user_permissions['read'] or user.profile.task_participants_read.filter(id=task.id).exists()
user_permissions['read'] = (
user_permissions['read'] or
user.profile.task_participants_read.filter(id=task.id).exists()
)
# Team members can view its teams tasks
user_permissions['upload'] = user_permissions['upload'] or user.profile.teams.filter(task__id=task.id, write=True).exists()
user_permissions['view_task'] = user_permissions['view_task'] or user.profile.teams.filter(task__id=task.id).exists()
user_permissions['upload'] = (
user_permissions['upload'] or
user.profile.teams.filter(task__id=task.id, write=True).exists()
)
user_permissions['view_task'] = (
user_permissions['view_task'] or
user.profile.teams.filter(task__id=task.id).exists()
)
user_permissions['write'] = user_permissions['write'] or user.profile.task_participants_write.filter(id=task.id).exists()
user_permissions['modify'] = user_permissions['modify'] or user.profile.task_participants_modify.filter(id=task.id).exists()
user_permissions['write'] = (
user_permissions['write'] or
user.profile.task_participants_write.filter(id=task.id).exists())
user_permissions['modify'] = (
user_permissions['modify'] or
user.profile.task_participants_modify.filter(id=task.id).exists()
)
return user_permissions
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment