Pokaż
Ignoruj:
Data:
2009-09-30 15:49:14 (17 years ago)
Autor:
marek
Opis:

re #195 - merged with latest trunk

Lokalizacja:
branches/Emisje
Pliki:
2 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • branches/Emisje

    • Property svn:mergeinfo
      •  

        old new  
         1/branches/AutoShopper:815-818 
        12/branches/ReklamaReorganizacja:568-731 
        2 /trunk:774-810 
         3/tags/BazaReklam_1.1.28:831 
         4/trunk:774-837 
  • branches/Emisje/Wierszowki/Wierszowki.Web/Controllers/UserController.cs

    r752 r838  
    6262            return View(user); 
    6363        } 
    64  
    6564        [Authorize] 
    6665        [AcceptVerbs(HttpVerbs.Get)] 
    6766        public ActionResult Edit(int id) 
    6867        { 
     68            User user = _service.Find(id); 
     69            if (user != null) 
     70            { 
     71                string name = ControllerContext.HttpContext.User.Identity.Name; 
     72                var LogInUser = _service.FindOne(u => u.Login == name); 
     73                if (LogInUser.Id == user.Id) 
     74                { 
    6975            return View(_service.Find(id)); 
     76        } 
     77                else 
     78                { 
     79                    ViewData["message"] = "error_user"; 
     80                    return View("Confirm");  
     81                } 
     82 
     83            } 
     84            ViewData["message"] = "error"; 
     85            return View("Confirm");           
    7086        } 
    7187 
     
    7793            { 
    7894                _service.Update(user); 
     95                
    7996            } 
    8097            catch (RulesException ex)