Beispiel #1
0
 public void SendPhoto(SPhotoData photo)
 {
     if (_CheckRight(EUserRights.UploadPhotos))
     {
         CVocaluxeServer.DoTask(CVocaluxeServer.SendPhoto, photo);
     }
 }
Beispiel #2
0
        public Stream Index()
        {
            if (WebOperationContext.Current != null)
            {
                WebOperationContext.Current.OutgoingResponse.ContentType = "text/html";
            }

            return(new MemoryStream(CVocaluxeServer.DoTask(CVocaluxeServer.GetSiteFile, "index.html")));
        }
Beispiel #3
0
        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());
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
 public SProfileData[] GetProfileList()
 {
     return(CVocaluxeServer.DoTask(CVocaluxeServer.GetProfileList));
 }
Beispiel #6
0
 private static EUserRoles _GetUserRoles(Guid profileId)
 {
     return((EUserRoles)CVocaluxeServer.GetUserRole(profileId));
 }
Beispiel #7
0
 private static Guid _GetProfileIdFormUsername(string username)
 {
     return(CVocaluxeServer.GetUserIdFromUsername(username));
 }
Beispiel #8
0
 private static bool _ValidateUserAndPassword(string userName, string password)
 {
     return(CVocaluxeServer.ValidatePassword(_GetProfileIdFormUsername(userName), password));
 }