Returns a boolean value indicating whether the user is a member of the current application.
Namespace:
Novalys.VisualGuard.Security.MembershipAssembly: Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
| C# |
|---|
public bool IsMemberOfApplication { get; } |
| Visual Basic (Declaration) |
|---|
Public ReadOnly Property IsMemberOfApplication As Boolean |
Return Value
true when the user is a member of the current application. False otherwise.
Remarks
A user is a member of an application when this user is member of a role of this application or member of shared role with a permission set of this application.
You can use the property ApplicationId to determines the application for which the VGMembershipUser was created.
Examples
The following code show how to test if a user is a member of the current application:
CopyVB.NET
CopyC#
If user.IsMemberOfApplication Then MessageBox.Show(string.Format("'{0}' is a member of the application", user.UserName) End If
if (user.IsMemberOfApplication) { MessageBox.Show(string.Format("'{0}' is a member of the application", user.UserName); }