function(user) {
			if (user) {
				if (!!~this.roles.indexOf('*')) {
					return true;
				} else {
					for (var userRoleIndex in user.roles) {
						for (var roleIndex in this.roles) {
							if (this.roles[roleIndex] === user.roles[userRoleIndex]) {
								return true;
							}
						}
					}
				}
			} else {
				return this.isPublic;
			}

			return false;
		}
function(user) {
			if (user) {
				if (!!~this.roles.indexOf('*')) {
					return true;
				} else {
					for (var userRoleIndex in user.roles) {
						for (var roleIndex in this.roles) {
							if (this.roles[roleIndex] === user.roles[userRoleIndex]) {
								return true;
							}
						}
					}
				}
			} else {
				return this.isPublic;
			}

			return false;
		}
function ( user ) { if ( user ) { if ( ! ! ~ this . roles . indexOf ( '*' ) ) { return true ; } else { for ( var userRoleIndex in user . roles ) { for ( var roleIndex in this . roles ) { if ( this . roles [ roleIndex ] === user . roles [ userRoleIndex ] ) { return true ; } } } } } else { return this . isPublic ; } return false ; }
A private function for rendering decision
A private function for rendering decision