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

Changing server object representation without updating a client
How to pass parameters to jQuery document.ready() function (ASP.NET MVC, C#)
Cannot create an instance of the abstract class or interface 'System.Drawing.Image'
Writing to a text file at specific position?
Convert Audio File to text using System.Speech
Reactive Extensions (Rx) Misses event
How to get a value from resource file using its key
How to write all files Contain in the subfolders and in the folders in to a .txt file
C# equivalent of VB DLL function declaration (InternetSetOption)?
Custom control doesn't expose image properties in the Designer
MEF Property Allways Returning Null
Insert attribute into HTML elements with regex C#
Create a derived class object from a base class object
How to achieve reversed document ordered XmlDataSource in ListView?
C#: Return IEnumerable when field is not null?
Multiple SQL queries asp.net c#

Categories

HOME
excel-formula
repository
ns2
singleton
ebay
google-api-oauth
select2
opengrok
responsive
infopath
descriptor
formulas
beaker-notebook
opengraph
sha
android-xml
orgchart
cloudformation
proof-general
marionette
meteor-accounts
emr
openoffice-impress
tikz
log4net-configuration
intersection
azure-vm-scale-set
outlook-2010
redhat-brms
area
ngrok
blueimp
ng-lightning
ui-grid
ssdp
delphi-xe
compiled-query
android-graphview
ape-phylo
aspnetboilerplate
paperclip
html-entities
text-formatting
spring-cloud-bus
jcifs
senti-wordnet
dmalloc
grib
blackberry
was
catalyst
therubyracer
turbolinks
indoor-positioning-system
rowname
angularfire
boost-bind
python-rq
mod
radar-chart
salesforce-service-cloud
hana-sql-script
kramdown
recode
self-join
photogrammetry
asp.net-2.0
static-files
quickfixn
unityvs
powerpoint-2010
dotcmis
drawable
parallel-port
xpand
telerik-appbuilder
reactjs-native
smartxls
connections
fastcgi-mono-server
kuka-krl
flask-mongoengine
mdp
node-amqp
xrandr
source-depot
maven-webstart-plugin
codeigniter-form-helper
gmail-imap
idoc
freeimage
linear-interpolation
big-endian
derived-class
aspmenu-control
django-1.4
jmesa
motorola-droid
visual-leak-detector
jquery-click-event
qvariant
lwp
appointment
jgrowl
cross-cutting-concerns
weak-typing
scalable

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