From 4d494c34ef1c755b40e0f70027f06f3ba7fde698 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Fri, 8 Sep 2017 10:17:35 +0530 Subject: [PATCH] Committing updated code regarding unblock user implementation --- 150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql | 51 --------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs | 1 + 2 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql diff --git a/150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql b/150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql deleted file mode 100644 index 2edcf97..0000000 --- a/150-DOCUMENTATION/002-DBScripts/GetBlockedUserByUserType.sql +++ /dev/null @@ -1,51 +0,0 @@ --- ================================================ --- Template generated from Template Explorer using: --- Create Procedure (New Menu).SQL --- --- Use the Specify Values for Template Parameters --- command (Ctrl-Shift-M) to fill in the parameter --- values below. --- --- This block of comments will not be included in --- the definition of the procedure. --- ================================================ -SET ANSI_NULLS ON -GO -SET QUOTED_IDENTIFIER ON -GO --- ============================================= --- Author: --- Create date: <2/8/2017> --- Description: --- ============================================= -CREATE PROCEDURE GetBlockedUserByUserType - -- Add the parameters for the stored procedure here - @iUserTypeId tinyint -AS -BEGIN - -- returns the metadata - IF 1=0 BEGIN - SET FMTONLY OFF - END - SELECT DISTINCT - AIAUser.Id, - AIAUser.FirstName, - AIAUser.LastName, - AIAUser.LoginId, - AIAUser.Password, - AIAUser.EmailId, - ISNULL(License.AccountNumber,'') AccountNumber, - IncorrectLoginAttempts.LoginTime - FROM - IncorrectLoginAttempts - INNER JOIN AIAUser ON IncorrectLoginAttempts.UserId = AIAUser.Id - INNER JOIN UserType ON AIAUser.UserTypeId = UserType.Id - LEFT JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId - LEFT JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id - LEFT JOIN License ON LicenseToEdition.LicenseId = License.Id - WHERE - IncorrectLoginAttempts.CntIncorrectLogins >= 5 - AND UserType.Priority >= (SELECT UserType.Priority FROM UserType WHERE UserType.Id=@iUserTypeId) - --AND ((@iLicenseId =0) OR (License.Id = @iLicenseId)) - --AND License.IsActive = 1 -END \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs index 0929e75..f41a202 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs @@ -212,6 +212,7 @@ namespace AIAHTML5.API.Models else { objUser.IsBlocked = true; + objUser.IncorrectLoginAttemptCount = 5; } } else -- libgit2 0.21.4