public Services.Packages.PackageCollection GetPackagesUploaded(ApiKey _ApiKey, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ /* if (!Services.Packages.Security.PackageSecureService.CheckAccessImp(_ApiKey.PackagesUploaded, SessionToken, "Read")) throw new UnauthorizedAccessException("Access Denied"); //*/ return _ApiKey.PackagesUploaded; }
public Services.Packages.Security.ApiKeyAccessControlListCollection GetACLs(ApiKey _ApiKey, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ /* if (!Services.Packages.Security.Security.ApiKeyAccessControlListSecureService.CheckAccessImp(_ApiKey.ACLs, SessionToken, "Read")) throw new UnauthorizedAccessException("Access Denied"); //*/ return _ApiKey.ACLs; }
public Services.Packages.Security.ModelUser GetOwner(ApiKey _ApiKey, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ //* if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_ApiKey.Owner, SessionToken, "Read")) throw new UnauthorizedAccessException("Access Denied"); //*/ return _ApiKey.Owner; }
public void SetACLs(ApiKey _ApiKey, Services.Packages.Security.ApiKeyAccessControlListCollection _ACLs, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ /* _ACLs.Reload(); if (_ACLs.Exists && !Services.Packages.Security.Security.ApiKeyAccessControlListSecureService.CheckAccessImp(_ACLs, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); else if (!_ACLs.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Create ACLs")) throw new UnauthorizedAccessException("Access Denied"); //*/ _ApiKey.ACLs = _ACLs; _ApiKey.Update(); }
public void CreateObjectFromOwner(ApiKey _ApiKey, Services.Packages.Security.ModelUser _Owner, string SessionToken) { ModelSession session = ApiKeySecureService.CheckSessionImp(SessionToken); //if (!Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApiKeyOwning")) // throw new UnauthorizedAccessException("Access Denied"); _ApiKey.Reload(); if (!_ApiKey.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Create ApiKeyOwning")) throw new UnauthorizedAccessException("Access Denied"); else if (_ApiKey.Exists && !ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); _ApiKey.Owner = session.User; _ApiKey.Owner = _Owner; _ApiKey.Create(); }
public void SetOrders(ApiKey _ApiKey, Services.Packages.PurchaseCollection _Orders, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ /* _Orders.Reload(); if (_Orders.Exists && !Services.Packages.Security.PurchaseSecureService.CheckAccessImp(_Orders, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); else if (!_Orders.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Create Orders")) throw new UnauthorizedAccessException("Access Denied"); //*/ _ApiKey.Orders = _Orders; _ApiKey.Update(); }
public void SetApplicationExceptionsLogged(ApiKey _ApiKey, Services.Packages.Log.ApplicationExceptionCollection _ApplicationExceptionsLogged, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ /* _ApplicationExceptionsLogged.Reload(); if (_ApplicationExceptionsLogged.Exists && !Services.Packages.Log.Security.ApplicationExceptionSecureService.CheckAccessImp(_ApplicationExceptionsLogged, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); else if (!_ApplicationExceptionsLogged.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Create ApplicationExceptionsLogged")) throw new UnauthorizedAccessException("Access Denied"); //*/ _ApiKey.ApplicationExceptionsLogged = _ApplicationExceptionsLogged; _ApiKey.Update(); }
public void SetOwner(ApiKey _ApiKey, Services.Packages.Security.ModelUser _Owner, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ //* _Owner.Reload(); if (_Owner.Exists && !Services.Packages.Security.Security.ModelUserSecureService.CheckAccessImp(_Owner, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); else if (!_Owner.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Create ApiKeyOwning")) throw new UnauthorizedAccessException("Access Denied"); //*/ _ApiKey.Owner = _Owner; _ApiKey.Update(); }
public void SetCustomer(ApiKey _ApiKey, Services.Packages.Customer _Customer, string SessionToken) { _ApiKey.Reload(); //* if (!Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Traverse")) throw new UnauthorizedAccessException("Access Denied"); //*/ //* _Customer.Reload(); if (_Customer.Exists && !Services.Packages.Security.CustomerSecureService.CheckAccessImp(_Customer, SessionToken, "Update")) throw new UnauthorizedAccessException("Access Denied"); else if (!_Customer.Exists && !Services.Packages.Security.ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Create LicensesIssued")) throw new UnauthorizedAccessException("Access Denied"); //*/ _ApiKey.Customer = _Customer; _ApiKey.Update(); }
public ApiKey Reload(ApiKey _ApiKey, string SessionToken) { _ApiKey.Reload(); if (!ApiKeySecureService.CheckAccessImp(_ApiKey, SessionToken, "Read")) throw new UnauthorizedAccessException("Access Denied"); return _ApiKey; }