LocalUserAccount Class |
Namespace: Dundas.BI.AccountServices
The LocalUserAccount type exposes the following members.
Name | Description | |
---|---|---|
![]() | LocalUserAccount |
Initializes a new instance of the LocalUserAccount class.
|
Name | Description | |
---|---|---|
![]() | AccountExpiryDate | Gets or sets the date when the account expires. |
![]() | AccountType |
Gets the type of the account.
(Inherited from Account.) |
![]() | ActiveTenantId | Gets the active tenant ID for the account. (Inherited from Account.) |
![]() | AllowedIPAddresses | Gets or sets the allowed IP addresses. (Inherited from MembershipBaseObject.) |
![]() | CanChangePassword |
Gets or sets a value indicating whether the account holder is permitted
to change their password.
|
![]() | CreatedTime |
Gets the UTC time the account or group was created.
(Inherited from MembershipBaseObject.) |
![]() | Culture |
Gets or sets the culture associated with the account or group.
(Inherited from MembershipBaseObject.) |
![]() | CustomAttributes |
Gets the account or group's explicitly assigned custom attributes.
(Inherited from MembershipBaseObject.) |
![]() | DeniedApplicationPrivilegeIds |
Gets the IDs of standard privileges denied to the account or group.
(Inherited from MembershipBaseObject.) |
![]() | Description |
Gets or sets a description that may be associated with the account or group.
(Inherited from MembershipBaseObject.) |
![]() | DisplayName |
Gets or sets the display name of the account.
(Inherited from Account.) |
![]() | EffectiveDisplayName | Gets the effective display name of the account. (Inherited from Account.) |
![]() | EmailAddress |
Gets or sets the account's email address.
(Inherited from Account.) |
![]() | ExternalId | Gets the external ID of the account or group. (Inherited from MembershipBaseObject.) |
![]() | FailedLogOnCount |
Gets the number of consecutive log on failures for the account.
|
![]() | GrantedApplicationPrivilegeIds |
Gets the IDs of standard privileges granted to the account or group.
(Inherited from MembershipBaseObject.) |
![]() | Id |
Gets the unique identifier of the account or group.
(Inherited from MembershipBaseObject.) |
![]() | IsAccountExpired |
Gets a value indicating whether the account has expired.
|
![]() | IsApiAccount |
Gets or sets a value indicating whether the account is an "API account".
(Inherited from Account.) |
![]() | IsEnabled |
Gets or sets a value indicating whether the account is enabled.
(Inherited from Account.) |
![]() | IsGlobal |
Gets or sets a value indicating whether the account is a global account.
(Inherited from Account.) |
![]() | IsLocked |
Gets or sets a value indicating whether the account is locked.
|
![]() | IsPasswordExpired |
Gets a value indicating whether the account's password has expired.
|
![]() | IsSeatReserved |
Gets or sets a value indicating whether the account has a reserved seat.
(Inherited from Account.) |
![]() | LastLogOnIpAddress | Gets the IP address where the user last logon. (Inherited from Account.) |
![]() | LastLogOnTime | Gets the UTC time the account last logged on. (Inherited from Account.) |
![]() | LockedUntil |
Gets the time until which the account is locked, or if the account is not locked.
|
![]() | LogOnCount |
Gets the number of times this account has logged on.
(Inherited from Account.) |
![]() | Name | Gets or sets the name of the account or group. (Inherited from MembershipBaseObject.) |
![]() | Password |
Sets the password for the account.
|
![]() | PasswordExpiryDate | Gets or sets an explicit date when the account's password expires. |
![]() | PasswordLastSetDate |
Gets the date (UTC) when the account's password was last set/changed.
|
![]() | PasswordNeverExpires |
Gets or sets a value indicating whether the account's password should never expire.
|
![]() | SeatKind | Gets or sets the kind of the seat used by the account or group. (Inherited from MembershipBaseObject.) |
![]() | SessionTimeout | Gets or sets the explicit session idle timeout for the account. (Inherited from Account.) |
![]() | SingleTenantId |
Gets or sets the ID of the single tenant associated with the account/group.
(Inherited from MembershipBaseObject.) |
![]() | TenantId |
Gets or sets the ID of the tenant associated with the account/group.
(Inherited from MembershipBaseObject.) |
![]() | TenantIds |
Gets a collection containing the IDs of the tenant(s) associated with the account/group.
(Inherited from MembershipBaseObject.) |
![]() | TimeZone | Gets or sets the time zone associated with the account or group. (Inherited from MembershipBaseObject.) |
![]() | TrackLogOnHistory |
Gets or sets a value indicating whether log on history should be tracked for the account.
(Inherited from Account.) |
![]() | Warnings | Gets a list of warnings associated with the instance. (Inherited from MembershipBaseObject.) |
This example demonstrates how to create the Dundas BI engine, start the Dundas BI engine, log on, create a local user account, and then shutdown the Dundas BI engine.
using Dundas.BI; using Dundas.BI.AccountServices; using Dundas.BI.Services; using System.Collections.ObjectModel; ... // Create the engine. EngineManager.CreateEngine( // Path to the application's data folder. Type: System.String @"C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1\www\BIWebsite\App_Data" ); try { // Start the Dundas BI Engine. EngineManager.StartEngine(); // Create a caller context not associated with any session. using(Engine.Current.GetService<ICallerContextService>().CreateAndSetCurrentContext(null)) { // LogOn. LogOnResult logOnResult = Engine.Current.GetService<ILogOnService>().LogOn( // The account name. Type: System.String "admin", // The password. Type: System.String "1234", // Delete other sessions for the logon to succeed. Type: System.Boolean true, // Culture to associate with the session, or null. Type: System.Globalization.CultureInfo null ); // Set the current session ID. using(Engine.Current.GetService<ICallerContextService>().CurrentContext.SetCurrentSessionId( logOnResult.Session.Id ); // Get the account service. IAccountService accountService = Engine.Current.GetService<IAccountService>(); // Define the local user account. LocalUserAccount account = new LocalUserAccount("JohnSmith", "1234"); // Define some properties account.EmailAddress = "JohnSmith@dundas.com"; account.DisplayName = "John Smith"; account.SeatKind = Dundas.BI.Licensing.LicenseSeatKind.StandardUser; account.IsSeatReserved = true; // Save the account. accountService.SaveAccount(account); } } finally { EngineManager.ShutdownEngine(); }