Search Results for

    Show / Hide Table of Contents

    Class UserInfo

    The light user info class that holds the relevant information for the current logged in user, or user that processes/tasks are running under

    Inheritance
    System.Object
    UserInfo
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.API.Core
    Assembly: API.dll
    Syntax
    [DataContract]
    [Serializable]
    public class UserInfo

    Properties

    AccountID

    LemonEdge is a multi-tenanted system, and thus you can have several different accounts all residing in the same database

    The default root account is 1

    This property holds the account the item belongs to. It can not be modified by a user, it is maintained internally by the system

    Declaration
    public long AccountID { get; set; }
    Property Value
    Type Description
    System.Int64

    DefaultTeamID

    Holds the team (and thus all permissions and security) that the user is running under. Next time they login they will default to this team unless they switch to another they are a member of.

    Declaration
    public Guid DefaultTeamID { get; set; }
    Property Value
    Type Description
    System.Guid

    EmailLogin

    The globally unique login for this user.

    Making it globally unique ensures users log into the correct account (if the system is multi-tenanted) automatically

    Declaration
    public string EmailLogin { get; set; }
    Property Value
    Type Description
    System.String

    ID

    Declaration
    [Key]
    public Guid ID { get; set; }
    Property Value
    Type Description
    System.Guid

    LastLoggedInRoleID

    Holds the last role the user was logged into. This is automatically the role they will be logged into the next time they start the application.

    Declaration
    public Guid? LastLoggedInRoleID { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Guid>

    LockInCanvas

    Indicates whether the user is locked into the RunInCanvasID or not. If they are, they can not switch out of it back to the main system, or to any other canvas. They can only run the system in the isolated canvas they are locked into.

    This is useful for training, onboarding and other similar scenarios requiring workflow/manager approval of the work they are doing

    Declaration
    public bool LockInCanvas { get; set; }
    Property Value
    Type Description
    System.Boolean

    Name

    The actual name of the user

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    RunInCanvasID

    Holds the ID of any canvas the user is currently running in. This is the canvas they will log back into automatically next time they run the application.

    If this holds null they are running in the *live* main system. Otherwise they are running in a completely isolated copy of the system under a canvas

    Declaration
    public Guid? RunInCanvasID { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Guid>

    Suspended

    Indicates if the user has been suspended.

    A suspended user can no longer login to the system. You can not delete users (for audit history and other reasons), so they can either be re-purposed or suspended.

    Declaration
    public bool Suspended { get; set; }
    Property Value
    Type Description
    System.Boolean

    Theme

    Holds the default theme for the users client applications. Some applications (such as the admin command console) do not adhere to themes, others do so where available, and the windows desktop application is fully theme compliant.

    Declaration
    public Theme Theme { get; set; }
    Property Value
    Type Description
    Theme

    WindowsLoginOnly

    Indicates the user can only login using windows active directory, they can not use a user name and password to login.

    By ensuring access only through the correct windows logins, you can restrict password policies and other security to be completely managed by your IT departments as required

    Declaration
    public bool WindowsLoginOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    EncryptPassword(Guid, String)

    Encrypts the specified text user password

    Declaration
    public static byte[] EncryptPassword(Guid saltUserID, string rawPassword)
    Parameters
    Type Name Description
    System.Guid saltUserID

    The user id providing a salt for each password that is the same

    System.String rawPassword

    The raw unencrypted user password

    Returns
    Type Description
    System.Byte[]

    An encrypted user password

    EncryptPasswordToBase64(Guid, String)

    Encrypts the specified text user password

    Declaration
    public static string EncryptPasswordToBase64(Guid saltUserID, string rawPassword)
    Parameters
    Type Name Description
    System.Guid saltUserID

    The user id providing a salt for each password that is the same

    System.String rawPassword

    The raw unencrypted user password

    Returns
    Type Description
    System.String

    An encrypted user password

    SetComputeHashALgorithm(Func<Guid, String, Byte[]>)

    If cryptography is not available (such as in Blazor), then this provides a mechanism for a different method of calculating HMACSHA512 Hashes for the password

    Declaration
    public static void SetComputeHashALgorithm(Func<Guid, string, byte[]> computeHash)
    Parameters
    Type Name Description
    System.Func<System.Guid, System.String, System.Byte[]> computeHash

    A function that given a ID and raw password, computes the System.Security.Cryptography.HMACSHA512 hash and returns it

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonEdge Technology. All rights reserved.