Allow multiple roles to access controller action

前端 未结 9 1240
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 15:19

Right now I decorate a method like this to allow \"members\" to access my controller action

[Authorize(Roles=\"members\")]

How do I

9条回答
  •  误落风尘
    2020-11-29 15:36

    Another option is to use a single authorize filter as you posted but remove the inner quotations.

    [Authorize(Roles="members,admin")]
    

提交回复
热议问题