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

WPF UI Animation Library
Using SqlConnection to execute query in VS 2010 Debugger: Evaluation of expression or statement timed out
Deserializing JSON to List<> is not working in C#
How to add an item to the Powerpont context menu using .net add-in project
Unable to add user controls to a panel dynamically
Callback from main function
Data Structure used for C#'s Dictionary.KeyCollection
How to add a string to this? [closed]
DataBinding to Textbox performance in C#.NET
How to use function max for auto number?
C# Add Object To List
How do I set the focus to the Desktop from within my C# application
How to give database access to a program?
Can not open a text file just after creating it from webservice
Calling C++ dll function from c#
How can I draw a single sprite at random positions 10 times?

Categories

HOME
asterisk
joomla
model-view-controller
marie
ns2
network-programming
gsm
abc
cryengine
itext7
squeak
sms
hibernate-mapping
markdown
wavefront
subprocess
wkhtmltopdf
phpexcel
dcos
oms
xmlhttprequest
web-worker
bookmarklet
owncloud
facebook-marketing-api
reportlab
alert
google-street-view
ampscript
beaker-notebook
bootstrap-accordion
knapsack-problem
tftp
dynamics-ax-2012-r3
boost-log
motherboard
realloc
mockserver
mybatis-generator
mixed-models
compiled-query
google-cloud-powershell
hierarchical-clustering
ionic2-select
spring-cloud-bus
serialversionuid
fluent-nhibernate-mapping
bioperl
photoshop-script
intermediate-language
typewriter
dynatable
alfred
hdr
foreground
gdi
db2-zos
boost-bind
dcast
jts
vensim
playn
transparentproxy
system.diagnostics
tidesdk
perfect-scrollbar
wingdb
pymol
nexusdb
numerical-recipes
pysvn
jsonmodel
yosemite
livescript
power-management
html5-filesystem
netbeans-plugins
8-puzzle
static-class
ia-32
objectdatasource
leap-year
asp.net-4.0
latex-suite
exi
cocotron
nx
dnsbl
screensharing
aspmenu-control
socketasynceventargs
cgaffinetransform
funambol
sipdroid
nscharacterset
p4.net
lts
calendarextender
expander
managed-code
urlscan

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