public static User GetObject(Setting setting, HttpRequest request, OaUser oaUser) { var oaTenant = Oa.GetResource <OaTenant>(setting, request, oaUser.TenantLink.ApsLink.Id); var oaAdminUser = Oa.GetResource <OaAdminUser>(setting, request, oaUser.AdminUserLink.ApsLink.Id); return(new User { ApsId = oaUser.AdminUserLink.ApsLink.Id, UserId = oaUser.UserId, Email = oaAdminUser.Email, Tenant = Tenant.GetObject(setting, request, oaTenant) }); }
public static Tenant GetObject(Setting setting, HttpRequest request, OaTenant oaTenant) { var oaApplication = Oa.GetResource <OaApplication>(setting, request, oaTenant.AppLink.ApsLink.Id); var oaAccount = Oa.GetResource <OaAccount>(setting, request, oaTenant.AccountLink.ApsLink.Id); return(new Tenant { Id = oaTenant.Aps.Id, CompanyName = oaAccount.CompanyName, App = Application.GetObject(oaApplication), // resources UsersLimit = oaTenant.UsersLimit.Limit, DiskspaceLimit = oaTenant.DiskspaceLimit.Limit, DevicesLimit = oaTenant.DevicesLimit.Limit }); }
public static Tenant GetObject(Setting setting, HttpRequest request, string oaTenantId) { var oaTenant = Oa.GetResource <OaTenant>(setting, request, oaTenantId); return(GetObject(setting, request, oaTenant)); }
public static User GetObject(Setting setting, HttpRequest request, string oaUserId) { var oaUser = Oa.GetResource <OaUser>(setting, request, oaUserId); return(GetObject(setting, request, oaUser)); }