<commit_before>define(['app', 'underscore', './app-config-service.js'], function (app, _) { 'use strict';

	app.factory('roleService',  ["$http","$location", "$rootScope", "appConfigService",
	 function($http,$location, $rootScope, appConfigService) {

		return new function(){

			this.isUserInRole = function(role) {

				if (!$rootScope.user)
					return false;

				return _.contains($rootScope.user.roles, role);
			};

			this.isIAC = function() {
				return this.isUserInRole(appConfigService.getRoleName('abschiac'));
			}

			this.isAdministrator = function() {
				return this.isUserInRole(appConfigService.getRoleName('Administrator'));
			}
			this.isAbsAdministrator = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsAdministrator'));
			}

			this.isAbsPublishingAuthority = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsPublishingAuthorities'));
			}
			this.isAbsNationalAuthorizedUser = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsNationalAuthorizedUser'));
			}

			this.isAbsNationalFocalPoint = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsNationalFocalPoint'));
			}

			this.isUser = function() {
				return this.isUserInRole(appConfigService.getRoleName('User'));
			}

			this.isAnyOtherRoleThenIAC = function() {

				return this.isAbsPublishingAuthority() ||
					this.isAbsNationalAuthorizedUser() ||
					this.isAbsNationalFocalPoint() ||
					this.isAbsAdministrator() ||
					this.isAdministrator()

			}
			this.hasAbsRoles = function() {
				return this.isAbsAdministrator() || this.isAnyOtherRoleThenIAC();
			}
		}

    }]);
});<commit_msg>include iac role for dashboad<commit_after>define(['app', 'underscore', './app-config-service.js'], function (app, _) { 'use strict';

	app.factory('roleService',  ["$http","$location", "$rootScope", "appConfigService",
	 function($http,$location, $rootScope, appConfigService) {

		return new function(){

			this.isUserInRole = function(role) {

				if (!$rootScope.user)
					return false;

				return _.contains($rootScope.user.roles, role);
			};

			this.isIAC = function() {
				return this.isUserInRole(appConfigService.getRoleName('abschiac'));
			}

			this.isAdministrator = function() {
				return this.isUserInRole(appConfigService.getRoleName('Administrator'));
			}
			this.isAbsAdministrator = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsAdministrator'));
			}

			this.isAbsPublishingAuthority = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsPublishingAuthorities'));
			}
			this.isAbsNationalAuthorizedUser = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsNationalAuthorizedUser'));
			}

			this.isAbsNationalFocalPoint = function() {
				return this.isUserInRole(appConfigService.getRoleName('AbsNationalFocalPoint'));
			}

			this.isUser = function() {
				return this.isUserInRole(appConfigService.getRoleName('User'));
			}

			this.isAnyOtherRoleThanIAC = function() {

				return this.isAbsPublishingAuthority() ||
					this.isAbsNationalAuthorizedUser() ||
					this.isAbsNationalFocalPoint() ||
					this.isAbsAdministrator() ||
					this.isAdministrator()

			}
			this.hasAbsRoles = function() {
				return this.isAbsAdministrator() || this.isAnyOtherRoleThanIAC() || this.isIAC();
			}
		}

    }]);
});
{'fraction_non_alphanumeric': 0.1408904510837727, 'fraction_numerical': 0.0, 'mean_word_length': 4.561889250814332, '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': '4123350', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1042, 'n_words': 139}