UserSessionData Class

Represents the currently logged in AccountDto user, their RoleDto, the CompanyDto they belong to (or are working in, in case of MobileTrack support) and the EnvironmentDto the user is currently working in.

Definition

Namespace: MobileTrack.DataContainers.Models
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public sealed class UserSessionData
Inheritance
Object    UserSessionData

Remarks

Events are thrown by the Replication Layer every time one of these properties change.

Constructors

UserSessionData(IAzureCosmosDb) Default constructor
UserSessionData(IAzureCosmosDb, AccountDto, String) Constructor with pre-set account

Properties

Account The signed-in user that is currently using the page.
Company The company the Account is a part of, or the company the MobileTrack administrator is currently working on.
CompanyEnvironments All environments in the Company.
Environment The current Environment the user is currently working on
EnvironmentsTree Represents a map of the environments in the company.
IpAddress The current user's IP address. Will only be set in the MainLayout.razor.cs file.
MfaConnection The Mfa connection for the user
PortalSetting The portal settings
RoleAssignments Current role assignments that the Account has.

Methods

IsItemAncestorsLockedT Returns whether the item is locked for editing or not.
Load Loads the user session data from the Replication Layer.

Events

OnCompanyChanged Invokes when the Company changes on the ReplicationLayer
OnEnvironmentChanged Invokes when the Environment changes on the ReplicationLayer
OnEnvironmentTreeChanged Invokes when the MutableEntityTreeNodeTItem changes on the ReplicationLayer
OnNotificationReceived Invokes when the Account receives a new notification.
OnRoleAssignmentsChanged Invokes when the Role changes on the ReplicationLayer
OnUserAccountChanged Invokes when the Account changes on the ReplicationLayer

Extension Methods

FilterItemsByUserPermissionsT Filters the items to the environment and sub-environments the currentUser has access to. If the currentUser is in the main environment, no filter will be applied.
(Defined by SessionDataExtensions)
GenerateAdminUrlToCompany Generates an admin URL to the Company overview page.
(Defined by UrlChecker)
GenerateUrlToAccount Generates a URL to an Account page, or th page to create a new account.
(Defined by UrlChecker)
GenerateUrlToAccountsOverviewPage Generates a URL to the Accounts overview page
(Defined by UrlChecker)
GenerateUrlToAlertRule Generates a URL to Alert rule page
(Defined by UrlChecker)
GenerateUrlToAlertType Generates a URL to Alert type page
(Defined by UrlChecker)
GenerateUrlToCompanyActionFlowsPage Generates a URL to the company's action flows page.
(Defined by UrlChecker)
GenerateUrlToCompanyLogs Generates a URL to the Company Logs page.
(Defined by UrlChecker)
GenerateUrlToCompanySettingsPage Generates a URL to the company's settings page.
(Defined by UrlChecker)
GenerateUrlToCompanyTemplatesPage Generates a URL to the company's templates page.
(Defined by UrlChecker)
GenerateUrlToCustomPageTrashPage Generates a URL to the custom page's trash page.
(Defined by UrlChecker)
GenerateUrlToDashboardEditor Generates a URL to the Dashboard editor page
(Defined by UrlChecker)
GenerateUrlToDevice Generates a URL to the DeviceDto page of user device
(Defined by UrlChecker)
GenerateUrlToDevicesOverviewPage Generates a URL to the Devices overview page
(Defined by UrlChecker)
GenerateUrlToEnvironmentT Generates a URL to the EnvironmentDto page of user environment
(Defined by UrlChecker)
GenerateUrlToEnvironmentT Generates a URL to the EnvironmentDto page of user environment
(Defined by UrlChecker)
GenerateUrlToEnvironmentEdit Generates a URL to the EnvironmentDto page of user environment
(Defined by UrlChecker)
GenerateUrlToEnvironmentsOverviewPage Generates a URL to the Environments overview page
(Defined by UrlChecker)
GenerateUrlToFileOverviewPage Generates a URL to the Files overview page
(Defined by UrlChecker)
GenerateUrlToGeofencesOverviewPage Generates a URL to the Geofence overview page
(Defined by UrlChecker)
GenerateUrlToGlobalMapMarkersOverviewPage Generates a URL to the Map markers
(Defined by UrlChecker)
GenerateUrlToHomePage Generates a URL to the home page the currentUser is a part of
(Defined by UrlChecker)
GenerateUrlToIpAddressWhiteBlackListPage Generates a URL to the company's trash page.
(Defined by UrlChecker)
GenerateUrlToMapMarker Generates a URL to the MapMarkerDto page of user mapMarker
(Defined by UrlChecker)
GenerateUrlToMapMarkersOverviewPage Generates a URL to the Map markers
(Defined by UrlChecker)
GenerateUrlToNewEnvironment Generates a URL to the EnvironmentDto page to create a new environment.
(Defined by UrlChecker)
GenerateUrlToNotificationSettings Generates a URL to the notifications settings page.
(Defined by UrlChecker)
GenerateUrlToSettingsPage Generates a URL to the user's settings page.
(Defined by UrlChecker)
GenerateUrlToTrashPage Generates a URL to the company's trash page.
(Defined by UrlChecker)
GetAccessibleEnvironmentsForUser Returns a list of environments the currentUser has access to.
(Defined by SessionDataExtensions)
GetUserPermissionsForItem Retrieves all user permissions a user has for a scope, either directly or from ancestor environments.
(Defined by SessionDataExtensions)

See Also