Skip to content
Snippets Groups Projects
Unverified Commit c6cabc65 authored by Ershad Kunnakkadan's avatar Ershad Kunnakkadan
Browse files

Refactored a couple of methods in TodoService

parent e0feb838
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !7926. Comments created here will be created in the context of that merge request.
......@@ -273,16 +273,19 @@ def attributes_for_todo(project, target, author, action, note = nil)
)
end
def filter_todo_users(users, project, target)
users = reject_users_without_access(users, project, target)
users.uniq
end
def filter_mentioned_users(project, target, author)
mentioned_users = target.mentioned_users(author)
mentioned_users = reject_users_without_access(mentioned_users, project, target)
mentioned_users.uniq
filter_todo_users(mentioned_users, project, target)
end
def filter_directly_addressed_users(project, target, author)
directly_addressed_users = target.directly_addressed_users(author)
directly_addressed_users = reject_users_without_access(directly_addressed_users, project, target)
directly_addressed_users.uniq
filter_todo_users(directly_addressed_users, project, target)
end
def reject_users_without_access(users, project, target)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment