Пример #1
0
        public bool IsProjectStewardOrganizationForProject(Project project)
        {
            var canStewardProjectsOrganization = project.GetCanStewardProjectsOrganization();

            return(canStewardProjectsOrganization != null &&
                   canStewardProjectsOrganization.OrganizationID == OrganizationID);
        }
        public override bool CanStewardProject(Person person, Project project)
        {
            if (person == null)
            {
                // Can happen if we are evaluating an anonymous user
                return(false);
            }
            var canStewardProjectsOrganizationForProject = project.GetCanStewardProjectsOrganization();

            return(canStewardProjectsOrganizationForProject != null && GetPersonStewardOrganizations(person).Any(x => x.OrganizationID == canStewardProjectsOrganizationForProject.OrganizationID));
        }