Commit 0e23a56836f7d57144cf4883078938748190b613
Merge branch 'LoginIssueForGAdmin' into Develop
Showing
2 changed files
with
14 additions
and
6 deletions
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs
@@ -184,7 +184,14 @@ using System.Data.SqlClient;namespace AIAHTML5.API.Controllers | @@ -184,7 +184,14 @@ using System.Data.SqlClient;namespace AIAHTML5.API.Controllers | ||
184 | { | 184 | { |
185 | //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0. | 185 | //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0. |
186 | //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin | 186 | //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin |
187 | - if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN) | 187 | + int licenseId, editionId; |
188 | + AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); | ||
189 | + | ||
190 | + userInfo.LicenseId = licenseId; | ||
191 | + userInfo.EditionId = editionId; | ||
192 | + | ||
193 | + //if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN) | ||
194 | + if(userInfo.LicenseId == 0) | ||
188 | { | 195 | { |
189 | userInfo.Modules = AIAHTML5.API.Models.Users.getAllModulesList(); | 196 | userInfo.Modules = AIAHTML5.API.Models.Users.getAllModulesList(); |
190 | 197 | ||
@@ -204,11 +211,11 @@ using System.Data.SqlClient;namespace AIAHTML5.API.Controllers | @@ -204,11 +211,11 @@ using System.Data.SqlClient;namespace AIAHTML5.API.Controllers | ||
204 | private static void CheckLicenseStatus(User userInfo) | 211 | private static void CheckLicenseStatus(User userInfo) |
205 | { | 212 | { |
206 | //05.1 For normal user need to get the license details, get the license id for authenticated user | 213 | //05.1 For normal user need to get the license details, get the license id for authenticated user |
207 | - int licenseId, editionId; | ||
208 | - AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); | 214 | + //int licenseId, editionId; |
215 | + //AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); | ||
209 | 216 | ||
210 | - userInfo.LicenseId = licenseId; | ||
211 | - userInfo.EditionId = editionId; | 217 | + //userInfo.LicenseId = licenseId; |
218 | + //userInfo.EditionId = editionId; | ||
212 | 219 | ||
213 | //05.2 get license details | 220 | //05.2 get license details |
214 | userInfo.LicenseInfo = AIAHTML5.API.Models.Users.getLicenseDetails(userInfo.LicenseId); | 221 | userInfo.LicenseInfo = AIAHTML5.API.Models.Users.getLicenseDetails(userInfo.LicenseId); |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -220,7 +220,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -220,7 +220,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
220 | } | 220 | } |
221 | else { | 221 | else { |
222 | 222 | ||
223 | - if (result.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && | 223 | + //if (result.UserType == UserTypeConstants.SUPER_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) && |
224 | + if (result.LicenseId == 0 && result.IsActive) { | ||
224 | $rootScope.userData = result; | 225 | $rootScope.userData = result; |
225 | $rootScope.userModules = result.Modules; | 226 | $rootScope.userModules = result.Modules; |
226 | $rootScope.isVisibleLogin = false; | 227 | $rootScope.isVisibleLogin = false; |