MVC3 logged in User can see only own stuff apart from Admin
A novice to asp.net and mvc3.  I am learning by setting myself challenges/developing an application. I tag all record tables where users interact with ProviderUserKey. Now I want to be able to restrict users logged in to be able to edit or delete their own records only but administrators can edit or delete any. I have been using scaffolding to generate controllers and views etc. for eg code for editing`// POST: /Post/Edit/5

        [HttpPost]
        public ActionResult Edit(PJpost pjpost)
        {
            if (ModelState.IsValid)
            {
                db.Entry(pjpost).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(pjpost);
        }`
Any help will be highly appreciated.
MVC3 logged in User can see only own stuff apart from Admin
===

A novice to asp.net and mvc3.  I am learning by setting myself challenges/developing an application. I tag all record tables where users interact with ProviderUserKey. Now I want to be able to restrict users logged in to be able to edit or delete their own records only but administrators can edit or delete any. I have been using scaffolding to generate controllers and views etc. for eg code for editing`// POST: /Post/Edit/5

        [HttpPost]
        public ActionResult Edit(PJpost pjpost)
        {
            if (ModelState.IsValid)
            {
                db.Entry(pjpost).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(pjpost);
        }`
Any help will be highly appreciated.