L
localhost
For a WinForms application, I authenticate users against a database
and then build a customized class (subclassed from IPrincipal) with
roles. I authenticate against a database instead of using the
inherent WindowsIdentity because different users sometimes share a
single machine, and each user has different app capabilities.
I now want to make sure that the current WinForm is set to this user
for applying declarative Role-Based security.
Right now I do the below. Is this sufficient?
System.Threading.Thread.CurrentPrincipal = myCustomPrincipal;
Thanks.
and then build a customized class (subclassed from IPrincipal) with
roles. I authenticate against a database instead of using the
inherent WindowsIdentity because different users sometimes share a
single machine, and each user has different app capabilities.
I now want to make sure that the current WinForm is set to this user
for applying declarative Role-Based security.
Right now I do the below. Is this sufficient?
System.Threading.Thread.CurrentPrincipal = myCustomPrincipal;
Thanks.