开发者

auto login while testing (and assigning a particular role to a testing user)

开发者 https://www.devze.com 2023-02-15 07:52 出处:网络
I found this: ASP.NET forms authentication - auto login with a test account while debugging? - which would get me half the way there.

I found this: ASP.NET forms authentication - auto login with a test account while debugging? - which would get me half the way there.

What would be the recommended approach to attach roles to the signed on user (for testing different permissions). I have a custom membership / role providers - so I guess I could override the role providers while in testing / debugging mode to grab a test role out of webconfig app settings etc. - but I don't want to be over thinking it where there may be a 开发者_运维知识库simple solution.


Why don't you create several different testusers, each with their appropriate roles and determine which user to auto-login from an entry in the webconfig?

0

精彩评论

暂无评论...
验证码 换一张
取 消