Security

Following tables represents a storage structure of Security system.

Security

SecurityUser

This table contains main information about User.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name nvarchar(256) NOT NULL Name of the User
Email nvarchar(256) NULL E-mail
IsLocked bit NOT NULL 1 - mean that the User is blocked and will not be able to login to the system
ExternalId nvarchar(1024) NULL User's identifier in third-party system (ActiveDirectory for example)
Timezone nvarchar(256) NULL Timezone of the User (+1,-4 etc)
Localization nvarchar(256) NULL Locale of the User (en, ru etc.)
DecimalSeparator nchar(1) NULL Char which used as decimal separator
PageSize int NULL Default page size for grid
StartPage nvarchar(256) NULL Default start page
IsRTL bit NULL Switch the interface to RTL

SecurityUserImpersonation

This table contains information about User's impersonation.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
SecurityUserId uniqueidentifier NOT NULL Reference on SecurityUser table. Substituted user
ImpSecurityUserId uniqueidentifier NOT NULL Reference on SecurityUser table. Deputy user
DateFrom datetime NOT NULL Record is valid from this date
DateTo datetime NOT NULL Record is valid to this date

SecurityUserState

This table contains information about interface settings (column order, sort in grids etc.).

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
SecurityUserId uniqueidentifier NOT NULL Reference on SecurityUser table
Key nvarchar(max) NOT NULL Key
Value nvarchar(max) NOT NULL Value

Security Group

This table contains information about Groups which combined users. Reference between SecurityUser and SecurityUserGroup is many to many and implemented in SecurityGroupToSecurityUser table.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Name nvarchar(128) NOT NULL Name of the Group
Comment nvarchar(max) NULL Group description
IsSyncWithDomainGroup bit NOT NULL 1 - mean that group required synchronization with domain

SecurityAuthentication

This table contains information required to authentificate the User.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
PasswordHash nvarchar(128) NULL Hash of the password
PasswordSalt nvarchar(128) NULL Salt to the password
SecurityUserId uniqueidentifier NOT NULL Reference on SecurityUser table
Login nvarchar(256) NOT NULL Login
AuthenticationType nvarchar(max) NULL 0 - Generic authentication1 - Domain authentication

SecurityRole

This table contains information about Roles. Reference between SecurityUser and SecurityRole is many to many and implemented in SecurityUserToSecurityRole table. Reference between SecurityGroup and SecurityRole is many to many and implemented in SecurityGroupToSecurityRole table.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Code nvarchar(128) NOT NULL System name of the Role
Name nvarchar(128) NOT NULL Name of the Role
IsSystem bit NOT NULL 1 - mean that the Role is required for business logic
Comment nvarchar(max) NULL Description of the Role
DomainGroup nvarchar(512) NULL Name of a domain group which is attached to Role

SecurityPermission

This table contains information about Permissions.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Code nvarchar(128) NOT NULL System name of the Permission
Name nvarchar(max) NOT NULL Name of the Permission
IsSystem bit NOT NULL 1 - mean that the Permission is required for business logic
GroupId uniqueidentifier NOT NULL Reference on SecurityPermissionGroup table

SecurityPermission Groups

This table contains information about Permission Groups.

Column name Column type Purpose
Id uniqueidentifier NOT NULL Primary key
Code nvarchar(128) NOT NULL System name of the Group
Name nvarchar(128) NOT NULL Name of the Group

SecurityRoleToSecurityPermission

This table contains many to many link between Role and Permission.

Column name Column type Purpose
SecurityRoleId uniqueidentifier NOT NULL Reference on SecurityRole table
SecurityPermissionId uniqueidentifier NOT NULLL Reference on SecurityPermission table
AccessType tinyint NOT NULL 0 - Denied; 1 - Allowed; 255 - Undefined