update directory name and access visibility
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using System.Net;
|
||||
using System.Security;
|
||||
using console_spo_utils.Interfaces.Services;
|
||||
|
||||
namespace console_spo_utils.Services;
|
||||
|
||||
public class SiteOptions : ISiteOptions
|
||||
{
|
||||
|
||||
private const string SiteCollection = "https://italsortbuttrio.sharepoint.com";
|
||||
public string TokenEndpoint { get; } = "https://login.microsoftonline.com/common/oauth2/token";
|
||||
public string DefaultAadAppId { get; } = "46e6296e-176f-4ebb-a14b-bdd5678c16e6";
|
||||
public Uri GetProjectYearSite()
|
||||
{
|
||||
return new Uri($"{SiteCollection}/sites/{GetProjYearTenant().Replace(" ","")}");
|
||||
}
|
||||
|
||||
private static int GetYear()
|
||||
{
|
||||
return DateTime.Today.Year;
|
||||
}
|
||||
|
||||
public string GetProjYearTenant()
|
||||
{
|
||||
return $"Commesse {GetYear()}";
|
||||
}
|
||||
|
||||
public string GetUser()
|
||||
{
|
||||
return "svcItsSharePointAdmin@italsort.com";
|
||||
}
|
||||
|
||||
public SecureString GetPassword()
|
||||
{
|
||||
return new NetworkCredential("", "$O,D1XBp1O5.OdjZt86#a=").SecurePassword;
|
||||
}
|
||||
|
||||
public string GetProjListTitle()
|
||||
{
|
||||
return $"Lista {GetProjYearTenant()}";
|
||||
}
|
||||
|
||||
public Uri GetSubProjSite(string projName)
|
||||
{
|
||||
return new Uri($"{GetProjectYearSite()}/{projName}");
|
||||
}
|
||||
|
||||
public string GetQuotationTenant()
|
||||
{
|
||||
return "Offerte";
|
||||
}
|
||||
|
||||
public string GetQuotationLibrary()
|
||||
{
|
||||
return $"{GetQuotationTenant()} {GetYear()}";
|
||||
}
|
||||
|
||||
public Uri GetQuotationSite()
|
||||
{
|
||||
return new Uri($"{SiteCollection}/sites/{GetQuotationTenant()}");
|
||||
}
|
||||
|
||||
public string GetSubProjList(string projName)
|
||||
{
|
||||
return $"SottoCommesse {projName}";
|
||||
}
|
||||
|
||||
private string GetProjectTenant()
|
||||
{
|
||||
return "Commesse";
|
||||
}
|
||||
|
||||
public Uri GetProjectSite()
|
||||
{
|
||||
return new Uri($"{SiteCollection}/sites/{GetProjectTenant()}");
|
||||
}
|
||||
|
||||
public string GetNonComplianceTenant()
|
||||
{
|
||||
return "Non Conformità";
|
||||
}
|
||||
|
||||
public string GetNonComplianceLibrary()
|
||||
{
|
||||
return $"{GetNonComplianceTenant()} {GetYear()}";
|
||||
}
|
||||
|
||||
public Uri GetNonComplianceSite()
|
||||
{
|
||||
return new Uri($"{SiteCollection}/sites/{GetNonComplianceTenant().Replace(" ", String.Empty)}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user