mpenrow
mpenrow

Reputation: 5683

What does Authorize(Users="*") mean?

I saw this in an ASP.NET MVC 2 app and I can't figure out what it means by looking at the MSDN help.

[Authorize(Users="*")]
public ActionResult Edit(int id)
{
...
}

The * is throwing me.

Upvotes: 3

Views: 1252

Answers (3)

Bogdan
Bogdan

Reputation: 21

It actually allows only the users that have the username equal to "*". The same thing happens to [Authorize(Users="?")]. It autorizes only the users that have "?" as the username.

These values are not interpreted as regular expressions.

Upvotes: 2

GrandMarquis
GrandMarquis

Reputation: 1913

It's mean ALL.

see for more infos about regular expressions:

http://en.wikipedia.org/wiki/Regular_expression

Upvotes: 0

heisenberg
heisenberg

Reputation: 9759

The asterisk is a wildcard which means "all".

Upvotes: 1

Related Questions