Commit edfbce7405dd687ddca393803e52a10b9614972e

Authored by Amrita Vishnoi
2 parents a4167b49 2267dd55

Merge branch 'LoginFixes1' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -119,6 +119,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
119 119  
120 120 if (url.indexOf('?unb:') != -1) {
121 121  
  122 + $rootScope.isVisibleLogin = true;
122 123 $rootScope.UnblockUser();
123 124 }
124 125 else if (url.indexOf('?em:') != -1) {
... ... @@ -352,29 +353,47 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
352 353 var userInfo = JSON.parse(currentUserDetails);
353 354  
354 355 if (userInfo.LoginId != undefined || userInfo.LoginId != "" || userInfo.LoginId != null) {
355   - if (userInfo.LicenseInfo.IsTermAccepted) {
  356 +
  357 + if (userInfo.UserType == UserTypeConstants.SUPER_ADMIN || userInfo.UserType == UserTypeConstants.GENERAL_ADMIN && result.IsActive) { //(!result.IsSubscriptionExpired) &&
  358 +
356 359 $rootScope.userData = userInfo;
  360 +
357 361 $rootScope.userModules = userInfo.Modules;
  362 +
358 363 $rootScope.isVisibleLogin = false;
359   - //$rootScope.haveRoleAdmin = true;
360   - $rootScope.licenseeAccountNumber = userInfo.LicenseInfo.AccountNumber;
  364 +
361 365  
362 366 if ($rootScope.refreshcheck == null) {
  367 +
363 368 $location.path('/');
  369 +
364 370 }
365   -
366 371 }
367   - else {
368   - if ($('#dvTerms').length > 0) {
369   - $('#dvTerms').html(userInfo.TermsOfServiceText);
  372 +
  373 + else
  374 + {
  375 + if (userInfo.LicenseInfo.IsTermAccepted) {
  376 + $rootScope.userData = userInfo;
  377 + $rootScope.userModules = userInfo.Modules;
  378 + $rootScope.isVisibleLogin = false;
  379 + //$rootScope.haveRoleAdmin = true;
  380 +
  381 + if ($rootScope.refreshcheck == null) {
  382 + $location.path('/');
  383 + }
  384 +
  385 + }
  386 + else {
  387 + if ($('#dvTerms').length > 0) {
  388 + $('#dvTerms').html(userInfo.TermsAndConditionsText);
  389 + }
  390 + $rootScope.isVisibleLogin = true;
  391 + $('#dvTermCondition').fadeIn();
  392 + $rootScope.userData = userInfo;
  393 + $rootScope.userModules = userInfo.Modules;
  394 + //$rootScope.haveRoleAdmin = true;
  395 + $location.path('/');
370 396 }
371   - $rootScope.isVisibleLogin = true;
372   - $('#dvTermCondition').fadeIn();
373   - $rootScope.userData = userInfo;
374   - $rootScope.userModules = userInfo.Modules;
375   - //$rootScope.haveRoleAdmin = true;
376   - $rootScope.licenseeAccountNumber = userInfo.LicenseInfo.AccountNumber;
377   - $location.path('/');
378 397 }
379 398 }
380 399 }
... ... @@ -580,7 +599,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
580 599 }
581 600 },
582 601 function (error) {
583   - console.log(' Error in authentication = ' + error.statusText);
  602 + console.log(' Error in UnblockUser = ' + error.statusText);
584 603 $rootScope.errorMessage = error;
585 604 $("#messageModal").modal('show');
586 605 }
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -230,7 +230,7 @@
230 230 </div>
231 231 <!-- Forgot User ID (Small modal) -->
232 232 <div class="modal fade" id="forgotUserModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm">
233   - <div class="modal-dialog" role="document">
  233 + <div class="modal-dialog modal-small" role="document">
234 234 <div class="modal-content">
235 235 <div class="modal-header">
236 236 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
... ... @@ -255,7 +255,7 @@
255 255 </div>
256 256 <!-- Forgot Password (Small modal) -->
257 257 <div class="modal fade" id="forgotPwdModal" role="dialog" tabindex="-1" aria-labelledby="exampleModalLabel" data-target=".forgot-sm1">
258   - <div class="modal-dialog" role="document">
  258 + <div class="modal-dialog modal-small" role="document">
259 259 <div class="modal-content">
260 260 <div class="modal-header">
261 261 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
... ...