Sha256: 16ea303838865340b74a533db5ba34a146682156fae86bd4550376d429743098

Contents?: true

Size: 683 Bytes

Versions: 234

Compression:

Stored size: 683 Bytes

Contents

(function () {

    /**
     * @ngdoc service
     * @name Bastion.run:FeatureFlag
     *
     * @description
     *   Handles checking if a state is enabled on state change. If the state is disabled, the user
     *   is redirected to a 404 page.
     */
    function FeaturesInit($rootScope, $window, FeatureFlag) {
        $rootScope.$on('$stateChangeStart', function (event, toState) {
            if (!FeatureFlag.stateEnabled(toState.name)) {
                $window.location.href = '/404';
            }
        });
    }

    angular
        .module('Bastion.features')
        .run(FeaturesInit);

    FeaturesInit.$inject = ['$rootScope', '$window', 'FeatureFlag'];

})();

Version data entries

234 entries across 234 versions & 2 rubygems

Version Path
katello-4.15.0.rc2 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.15.0.rc1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.0 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.0.rc3 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.0.rc2 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.0.rc1.1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.14.0.rc1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.13.1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.13.0 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.12.1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.13.0.rc1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.12.0 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.12.0.rc3 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.12.0.rc2 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.12.0.rc1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.11.1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.11.0 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.11.0.rc2 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js
katello-4.11.0.rc1 engines/bastion/app/assets/javascripts/bastion/features/feature-flag.run.js