Exemple #1
0
        public static bool IsPersonAProjectOwnerWhoCanStewardProjects(this Person person)
        {
            // If anonymous, definitely not Project owner or Steward
            if (person == null)
            {
                return(false);
            }

            var canStewardProjectsOrganizationRelationship = MultiTenantHelpers.GetCanStewardProjectsOrganizationRelationship();

            if (MultiTenantHelpers.GetProjectStewardshipAreaType() == ProjectStewardshipAreaType.ProjectStewardingOrganizations)
            {
                return(Role.ProjectSteward.RoleID == person.RoleID &&
                       canStewardProjectsOrganizationRelationship != null &&
                       canStewardProjectsOrganizationRelationship.OrganizationTypeOrganizationRelationshipTypes.Any(
                           x => x.OrganizationTypeID == person.Organization.OrganizationTypeID));
            }

            return(Role.ProjectSteward.RoleID == person.RoleID);
        }
Exemple #2
0
 public static bool CanStewardProjects(this Organization organization)
 {
     return(organization.OrganizationType.OrganizationTypeOrganizationRelationshipTypes.Any(x => x.OrganizationRelationshipTypeID == MultiTenantHelpers.GetCanStewardProjectsOrganizationRelationship()?.OrganizationRelationshipTypeID));
 }
Exemple #3
0
 public bool CanStewardProjects()
 {
     return(OrganizationType.OrganizationTypeRelationshipTypes.Any(x => x.RelationshipTypeID == MultiTenantHelpers.GetCanStewardProjectsOrganizationRelationship()?.RelationshipTypeID));
 }