Purpose: This document provides an overview of the use of the SecurityBasics.CurrentUser property that contains an object reference to the currently logged in user for the application.
CurrentUser Overview
The MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser property contains an object reference to the currently logged on user for the application. This property defaults to an instance of the MicroFour.StrataFrame.Security.AdminUser class so that all permissions will be granted unless the CurrentUser is set to another object. This default functionality provides support for the application framework when security is not being used by the application.
The SecurityBasics.CurrentUser property returns an object reference that implements the MicroFour.StrataFrame.Security.ISecurityUser interface. This interface describes methods and properties that can be used to access:
- User's primary key (UserID or UserPK)
- User's login name
- User's login time
- User's session lockout time
- User's permissions
For more information on accessing the current user’s permissions, see Accessing Permissions Programmatically, and for more information on accessing the user’s properties, see Accessing CurrentUser Information.
The classes within the StrataFrame application framework and the StrataFrame security module that implement the ISecurityUser interface are:
- AdminUser - When the built-in administrator credentials are used to log into the application.
- SecurityMaintenanceUser - When the built-in security maintenance credentials were used to log into the application.
- LoggedInUser - When a standard user’s credentials were used to log into the application.