开发者

Working with custom role in VB.NET win application

开发者 https://www.devze.com 2022-12-27 12:05 出处:网络
I am looking for ways to implement custom user-roles in windows application with vb.net. I g开发者_开发技巧ot a database table called Roles with Administrator and User entries. User cannot see some of

I am looking for ways to implement custom user-roles in windows application with vb.net. I g开发者_开发技巧ot a database table called Roles with Administrator and User entries. User cannot see some of the form data. In ASP.NET MVC we can do like.

[Authorize(Roles = "Administrator")]
public function GetAccount() as Array

End Function

If it could be done this way that would be great.

Thanks in advance.


The source code for the ASP.NET Authorize attribute is online here. You can see how they implemented it in MVC and adapt it to your needs.

0

精彩评论

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