Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ロールを持つメンバーを含むデータベーステーブルがあります。問題を使用するアクションがあります[Autorize(Roles="admin")] 。Asp.netMVCに、どのメンバーがどのロールに関連付けられているかを通知する方法です。
[Autorize(Roles="admin")]
これを処理するデフォルトのasp.netメンバーシッププロバイダーを使用するか、独自の役割を担う必要があります。
基本的に、必要なのは、.netがuser.IsInRole( "admin")を実行するときに、プリンシパルが作成されたロールのリストでそのロールを持つことです。