}
// GET: ProjectTasks/Create
+ [Authorize]
public ActionResult Create()
{
ViewBag.project_id = new SelectList(db.Projects, "id", "name");
// POST: ProjectTasks/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "id,project_id,name,description,created_at,updated_at,task_status_id,user_id")] ProjectTask projectTask)
}
// GET: ProjectTasks/Edit/5
+ [Authorize]
public ActionResult Edit(int? id)
{
if (id == null)
// POST: ProjectTasks/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Edit([Bind(Include = "id,project_id,name,description,task_status_id,user_id,created_at")] ProjectTask projectTask)
}
// GET: ProjectTasks/Delete/5
+ [Authorize(Roles = "admin")]
public ActionResult Delete(int? id)
{
if (id == null)
}
// POST: ProjectTasks/Delete/5
+ [Authorize(Roles = "admin")]
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public ActionResult DeleteConfirmed(int id)