public void SendPhoto(SPhotoData photo) { if (_CheckRight(EUserRights.UploadPhotos)) { CVocaluxeServer.DoTask(CVocaluxeServer.SendPhoto, photo); } }
public Stream Index() { if (WebOperationContext.Current != null) { WebOperationContext.Current.OutgoingResponse.ContentType = "text/html"; } return(new MemoryStream(CVocaluxeServer.DoTask(CVocaluxeServer.GetSiteFile, "index.html"))); }
public SProfileData GetProfile(int profileId) { Guid sessionKey = _GetSession(); if (CSessionControl.GetUserIdFromSession(sessionKey) == profileId || _CheckRight(EUserRights.ViewOtherProfiles)) { bool isReadonly = (!CSessionControl.RequestRight(sessionKey, EUserRights.EditAllProfiles) && CSessionControl.GetUserIdFromSession(sessionKey) != profileId); return(CVocaluxeServer.DoTask(CVocaluxeServer.GetProfileData, profileId, isReadonly)); } return(new SProfileData()); }
public Stream GetImgFile(string filename) { if (WebOperationContext.Current != null) { WebOperationContext.Current.OutgoingResponse.ContentType = "image/png"; WebOperationContext.Current.OutgoingResponse.LastModified = DateTime.UtcNow; WebOperationContext.Current.OutgoingResponse.Headers.Add( HttpResponseHeader.Expires, DateTime.UtcNow.AddYears(1).ToString("r")); } byte[] data = CVocaluxeServer.DoTask(CVocaluxeServer.GetSiteFile, "img/" + filename); if (data != null) { return(new MemoryStream(data)); } if (WebOperationContext.Current != null) { WebOperationContext.Current.OutgoingResponse.StatusCode = HttpStatusCode.NotFound; } return(null); }
public SProfileData[] GetProfileList() { return(CVocaluxeServer.DoTask(CVocaluxeServer.GetProfileList)); }
private static EUserRoles _GetUserRoles(Guid profileId) { return((EUserRoles)CVocaluxeServer.GetUserRole(profileId)); }
private static Guid _GetProfileIdFormUsername(string username) { return(CVocaluxeServer.GetUserIdFromUsername(username)); }
private static bool _ValidateUserAndPassword(string userName, string password) { return(CVocaluxeServer.ValidatePassword(_GetProfileIdFormUsername(userName), password)); }