Commit 3346ff91 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Elimina valores de rol literales para centralizar

parent 336ec244
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ define([

		_authChecker: function() {

			if (!this.roleGuestActive && Credentials.get("userRole") === "ROLE_GUEST") {
			if (!this.roleGuestActive && Credentials.userIsGuest()) {
				if (this.templateDisplayerPdfError) {
					this._publish(this.templateDisplayerPdfError.getChannel("CHANGE_TEMPLATE"), {
						template: TemplateAuthFailed
+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ define([

		_isRegisteredUser: function(item) {

			return Credentials.get('userRole') !== 'ROLE_GUEST';
			return !Credentials.userIsGuest();
		},

		_select: function(item, total) {
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ define([

		_checkUserIsRegistered: function() {

			return Credentials.get('userRole') !== 'ROLE_GUEST';
			return !Credentials.userIsGuest();
		},

		_startLoading: function() {
+2 −3
Original line number Diff line number Diff line
@@ -195,10 +195,9 @@ define([
									var accessibilityId = item && item.accessibility && item.accessibility.id,
										browseableAccesibilities = [2], // libre
										accessibilityIsBrowseable = accessibilityId &&
											browseableAccesibilities.indexOf(accessibilityId) !== -1,
										userRoleIsAdmin = Credentials.get('userRole') === 'ROLE_ADMINISTRATOR';
											browseableAccesibilities.indexOf(accessibilityId) !== -1;

									return accessibilityIsBrowseable || userRoleIsAdmin;
									return accessibilityIsBrowseable || Credentials.userIsEditor();
								}
							}]
						}
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ define([
				info: ''
			};

			if (Credentials.get('userRole') === 'ROLE_GUEST') {
			if (Credentials.userIsGuest()) {
				obj.roleGuest = this.i18n.contentInfo1 + ' ';
				obj.roleGuest += this.i18n.visitor;
				obj.roleGuest += this.i18n.contentInfo2;
Loading