問題タブ [isaccessibletouser]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
asp.net - XmlSiteMapProviderは、ユーザーが指定されたロールにあることをどのようにチェックしますか?
を継承して自分のSiteMapProviderをロールしSystem.Web.XmlSiteMapProvider
ます。
ユーザーがsiteMapNodeのプロパティで指定されたロールにあることを確認するロジックをオーバーライドしたいroles
:
どうやってやるの?XmlSiteMapProviderは、どのクラスのメンバーを呼び出してそれをチェックしsecurityTrimmingEnabled="true"
ますか?
asp.net - IPrincipal はどのように役割を取得しますか?
仕組みを知る必要がありますSiteMapProvider.IsAccessibleToUser()
。
フォーム認証の場合に使用する組み込みXmlSiteMapProvider
呼び出し。HttpContext.User.IsInRole()
System.Security.Principal.GenericPrincipal
現在のユーザーはどこで役割を取得しますか? この種の情報をロードするプロバイダーはどれですか? オーバーロードしてカスタム ロジックを使用したい。