<commit_before>/**
 * @ngdoc function
 * @name sraApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the sraApp
 */
(function() {
    var app = angular.module('mainModule', []);

    app.controller('CustomersController', ['$scope', '$location','$rootScope',
        function ($scope, $location, $rootScope) {

            //Do the session work here!
        }]);

})();<commit_msg>Included checks for the session identifier. validating session identifier and the user name and redirecting to login if the session doesn't exist.<commit_after>/**
 * @ngdoc function
 * @name sraApp.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the sraApp
 */
(function() {
    var app = angular.module('mainModule', []);

    app.controller('CustomersController', ['$scope', '$location','$rootScope',
        function ($scope, $location, $rootScope) {
            var sessionIdentifier = sessionStorage.getItem('sessionIdentifier');

            if (sessionIdentifier == '' ||
                sessionIdentifier == null ||
                typeof sessionIdentifier == 'undefined'){

                $rootScope.isUserLoggedIn = false;
                $rootScope.userName = '';
                sessionStorage.setItem('userFullName', '');
                sessionStorage.setItem('sessionIdentifier', '');

                $location.path("/");
            }

            $rootScope.isUserLoggedIn = true;
            $rootScope.userName = sessionStorage.getItem('userFullName');
        }]);

})();
{'fraction_non_alphanumeric': 0.142668428005284, 'fraction_numerical': 0.0, 'mean_word_length': 2.7223587223587224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4588514', 'n_tokens_mistral': 401, 'n_tokens_neox': 387, 'n_words': 90}