c#


Authorize an entire security group to perform an Action in ASP.Net MVC


I'd like to authorize users to perform specific actions within my controllers. I've found the ASP.NET tutorial which explains how to allow individual users to perform specific actions but can this be extended to security groups? For example, would everyone belonging to the "domain\group" security group have access to the GetSecrets action if the code looked like this:
[Authorize(Users="domain\group")]
public ActionResult GetSecrets()
{ return View(); }
If not, how would I do this?
You want to use the Roles property. Note that this can be a comma-separated list of roles.
[Authorize(Roles=#"domain\group")]

Related Links

Issue in implementing GAMMA.INV function
C# Group By DataTable Rows/Columns
AutoMapper throwing “No default constructor” during validation
Passing a Type through Layers
C# Decrypt a SOAP Message Encrypted with an X.509 Certificate
Do Right click when press a button [duplicate]
What is the purpose of set { return; }?
Selenium cannot locate Drop down located within modal
C# Ninject: How to bind to method async
Appending the code onto “jsoninput.json” file in Server.MapPath using FileStream and StreamWriter
How do I convert 6 wav audio channels into 2 from NAudio in c#
Android - How to define the route in my country?
C# Send input to separate process through command prompt
How does .NET know when to continue to the next line of code?
NLog with AutoFac - How to give logger name
Execute Insert command and return inserted Id in SQL Server using C#

Categories

HOME
teradata
network-programming
highmaps
jquery-plugins
hex
arguments
snmp
ms-access-2010
pdf-generation
webpack-dev-server
subprocess
jpql
urllib2
email-attachments
console-application
responsive
multibinding
powerpivot
xforms
bug-reporting
lotusscript
rndis
policy
continuous-fourier
expressionengine
symlink
android-cursorloader
libxml2
drombler-fx
semantic-ui-react
concrete5
xlib
overflow
jcr
javax
const
cowboy
flume-ng
taleo
ocpjp
azure-data-catalog
nao-robot
ng-class
openxava
fckeditor
webmatrix
liferay-ide
tsc
therubyracer
addressbook
sprockets
aws-kms
salesforce-service-cloud
yfiles
recode
producer-consumer
page-flipping
pdcurses
teamwork
radgrid
connection-timeout
data-quality-services
jad
dockerpy
conkeror
crtdbg.h
novell
yosemite
worklight-appcenter
visual-c#-express-2010
enquire.js
carrier
adabas
randomaccessfile
kohana-orm
dynamic-expresso
brew
correctness
states
google-email-audit-api
sup
nsundomanager
httppostedfilebase
recess
dongle
mysql-logic
coderush-xpress
data-formats
projectgen
httpbrowsercapabilities

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App