private TaskSecurityInfo GetTaskSecurityInfoWithSecurity(Task task, ProjectSecurityProject projectSecurity, ProjectSecurityTask taskSecurity)
 {
     return(new TaskSecurityInfo
     {
         CanEdit = taskSecurity.CanUpdateEntity(task),
         CanCreateSubtask = taskSecurity.CanCreateSubtask(task),
         CanCreateTimeSpend = taskSecurity.CanCreateTimeSpend(task),
         CanDelete = taskSecurity.CanDeleteEntity(task),
         CanReadFiles = projectSecurity.CanReadFiles(task.Project)
     });
 }
        private ProjectSecurityInfo GetProjectSecurityInfoWithSecurity(Project project, ProjectSecurityProject projectSecurity, ProjectSecurityMilestone milestoneSecurity, ProjectSecurityMessage messageSecurity, ProjectSecurityTask taskSecurity, ProjectSecurityTimeTracking timeSpendSecurity)
        {
            return(new ProjectSecurityInfo
            {
                CanCreateMilestone = milestoneSecurity.CanCreateEntities(project),
                CanCreateMessage = messageSecurity.CanCreateEntities(project),
                CanCreateTask = taskSecurity.CanCreateEntities(project),
                CanCreateTimeSpend = timeSpendSecurity.CanCreateEntities(project),

                CanEditTeam = projectSecurity.CanEditTeam(project),
                CanReadFiles = projectSecurity.CanReadFiles(project),
                CanReadMilestones = milestoneSecurity.CanReadEntities(project),
                CanReadMessages = messageSecurity.CanReadEntities(project),
                CanReadTasks = taskSecurity.CanReadEntities(project),
                IsInTeam = milestoneSecurity.Common.IsInTeam(project, SecurityContext.CurrentAccount.ID, false),
                CanLinkContact = projectSecurity.CanLinkContact(project),
                CanReadContacts = projectSecurity.CanReadContacts(project),

                CanEdit = projectSecurity.CanUpdateEntity(project),
                CanDelete = projectSecurity.CanDeleteEntity(project),
            });
        }