1

What is the best and/or most efficient way to place Authorization on an @Html.Actionlink so so those not authrorized DO NOT SEE THE LINK.

J0NNY ZER0
  • 707
  • 2
  • 13
  • 32

2 Answers2

2
@if (User.IsInRole("Administrators")) { Html.ActionLink(...) }
Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291
0

Mystere Man was indeed first to the punch here and deserves credit, but to provide additional info this has been asked here in other similar scenarios:

User permissions on certain views based on roles

Community
  • 1
  • 1
Adam Tuliper
  • 29,982
  • 4
  • 53
  • 71