2010-12-28 7 views
0

여러 필터 속성을 스택화할 수 있습니까? 예를 들어 나는 사람에게 권한을 "관리자"또는 "큐"가있는 경우 확인이 속성을 가지고여러 개의 FilterAttributes를 가질 수 있습니까?

[ClientPortalSecured("Administrator", "Queue")] 
    public ActionResult Index() 
    { 
     return View(this.GetModel()); 
    } 

하지만 나는이와 다른 것을 확인하고 싶다면? 이런 식으로 할 수 있습니까?

[ClientPortalSecured("Administrator", "Queue")] 
    [ClientPortalSecured("abc")] 
    public ActionResult Index() 
    { 
     return View(this.GetModel()); 
    } 

나는 이것을 시도 할 때 현재 "Duplicate 'ClientPortalSecured'속성"컴파일러 오류가 발생합니다.

답변

0

발견. 내 ClientPortalSecuredAttribute 클래스에

[AttributeUsageAttribute(AttributeTargets.All, AllowMultiple = true)]

추가

관련 문제