blacklight-access_controls 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +31 -0
- data/.rubocop.yml +1 -4
- data/.rubocop_todo.yml +1 -1
- data/.solr_wrapper.yml +2 -0
- data/README.textile +3 -5
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/blacklight-access_controls.gemspec +4 -4
- data/lib/blacklight/access_controls/enforcement.rb +3 -2
- data/solr_conf/conf/_rest_managed.json +3 -0
- data/solr_conf/conf/admin-extra.html +12 -5
- data/solr_conf/conf/elevate.xml +1 -3
- data/solr_conf/conf/mapping-ISOLatin1Accent.txt +76 -76
- data/solr_conf/conf/schema.xml +257 -238
- data/solr_conf/conf/scripts.conf +24 -0
- data/solr_conf/conf/solrconfig.xml +104 -154
- data/solr_conf/conf/stopwords.txt +44 -0
- data/solr_conf/conf/{lang/stopwords_en.txt → stopwords_en.txt} +5 -1
- data/solr_conf/conf/synonyms.txt +5 -3
- data/solr_conf/conf/xslt/example.xsl +1 -1
- data/solr_conf/conf/xslt/example_atom.xsl +1 -1
- data/solr_conf/conf/xslt/example_rss.xsl +1 -1
- data/solr_conf/conf/xslt/luke.xsl +3 -3
- data/spec/factories/user.rb +1 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
- data/spec/unit/blacklight/access_controls/search_builder_spec.rb +3 -5
- metadata +15 -70
- data/.travis.yml +0 -18
- data/solr_conf/conf/abc123 +0 -0
- data/solr_conf/conf/admin-extra.menu-bottom.html +0 -25
- data/solr_conf/conf/admin-extra.menu-top.html +0 -25
- data/solr_conf/conf/clustering/carrot2/kmeans-attributes.xml +0 -19
- data/solr_conf/conf/clustering/carrot2/lingo-attributes.xml +0 -24
- data/solr_conf/conf/clustering/carrot2/stc-attributes.xml +0 -19
- data/solr_conf/conf/currency.xml +0 -67
- data/solr_conf/conf/dataimport.properties +0 -3
- data/solr_conf/conf/db-data-config.xml +0 -93
- data/solr_conf/conf/lang/contractions_ca.txt +0 -8
- data/solr_conf/conf/lang/contractions_fr.txt +0 -15
- data/solr_conf/conf/lang/contractions_ga.txt +0 -5
- data/solr_conf/conf/lang/contractions_it.txt +0 -23
- data/solr_conf/conf/lang/hyphenations_ga.txt +0 -5
- data/solr_conf/conf/lang/stemdict_nl.txt +0 -6
- data/solr_conf/conf/lang/stoptags_ja.txt +0 -420
- data/solr_conf/conf/lang/stopwords_ar.txt +0 -125
- data/solr_conf/conf/lang/stopwords_bg.txt +0 -193
- data/solr_conf/conf/lang/stopwords_ca.txt +0 -220
- data/solr_conf/conf/lang/stopwords_ckb.txt +0 -136
- data/solr_conf/conf/lang/stopwords_cz.txt +0 -172
- data/solr_conf/conf/lang/stopwords_da.txt +0 -110
- data/solr_conf/conf/lang/stopwords_de.txt +0 -294
- data/solr_conf/conf/lang/stopwords_el.txt +0 -78
- data/solr_conf/conf/lang/stopwords_es.txt +0 -356
- data/solr_conf/conf/lang/stopwords_eu.txt +0 -99
- data/solr_conf/conf/lang/stopwords_fa.txt +0 -313
- data/solr_conf/conf/lang/stopwords_fi.txt +0 -97
- data/solr_conf/conf/lang/stopwords_fr.txt +0 -186
- data/solr_conf/conf/lang/stopwords_ga.txt +0 -110
- data/solr_conf/conf/lang/stopwords_gl.txt +0 -161
- data/solr_conf/conf/lang/stopwords_hi.txt +0 -235
- data/solr_conf/conf/lang/stopwords_hu.txt +0 -211
- data/solr_conf/conf/lang/stopwords_hy.txt +0 -46
- data/solr_conf/conf/lang/stopwords_id.txt +0 -359
- data/solr_conf/conf/lang/stopwords_it.txt +0 -303
- data/solr_conf/conf/lang/stopwords_ja.txt +0 -127
- data/solr_conf/conf/lang/stopwords_lv.txt +0 -172
- data/solr_conf/conf/lang/stopwords_nl.txt +0 -119
- data/solr_conf/conf/lang/stopwords_no.txt +0 -194
- data/solr_conf/conf/lang/stopwords_pt.txt +0 -253
- data/solr_conf/conf/lang/stopwords_ro.txt +0 -233
- data/solr_conf/conf/lang/stopwords_ru.txt +0 -243
- data/solr_conf/conf/lang/stopwords_sv.txt +0 -133
- data/solr_conf/conf/lang/stopwords_th.txt +0 -119
- data/solr_conf/conf/lang/stopwords_tr.txt +0 -212
- data/solr_conf/conf/lang/userdict_ja.txt +0 -29
- data/solr_conf/conf/mapping-FoldToASCII.txt +0 -3813
- data/solr_conf/conf/solrconfig.adams.xml +0 -1903
- data/solr_conf/conf/solrconfig.old.xml +0 -1634
- data/solr_conf/conf/solrconfig.xml.orig +0 -3531
- data/solr_conf/conf/update-script.js +0 -53
- data/solr_conf/conf/xslt/updateXml.xsl +0 -70
@@ -1,53 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
This is a basic skeleton JavaScript update processor.
|
3
|
-
|
4
|
-
In order for this to be executed, it must be properly wired into solrconfig.xml; by default it is commented out in
|
5
|
-
the example solrconfig.xml and must be uncommented to be enabled.
|
6
|
-
|
7
|
-
See http://wiki.apache.org/solr/ScriptUpdateProcessor for more details.
|
8
|
-
*/
|
9
|
-
|
10
|
-
function processAdd(cmd) {
|
11
|
-
|
12
|
-
doc = cmd.solrDoc; // org.apache.solr.common.SolrInputDocument
|
13
|
-
id = doc.getFieldValue("id");
|
14
|
-
logger.info("update-script#processAdd: id=" + id);
|
15
|
-
|
16
|
-
// Set a field value:
|
17
|
-
// doc.setField("foo_s", "whatever");
|
18
|
-
|
19
|
-
// Get a configuration parameter:
|
20
|
-
// config_param = params.get('config_param'); // "params" only exists if processor configured with <lst name="params">
|
21
|
-
|
22
|
-
// Get a request parameter:
|
23
|
-
// some_param = req.getParams().get("some_param")
|
24
|
-
|
25
|
-
// Add a field of field names that match a pattern:
|
26
|
-
// - Potentially useful to determine the fields/attributes represented in a result set, via faceting on field_name_ss
|
27
|
-
// field_names = doc.getFieldNames().toArray();
|
28
|
-
// for(i=0; i < field_names.length; i++) {
|
29
|
-
// field_name = field_names[i];
|
30
|
-
// if (/attr_.*/.test(field_name)) { doc.addField("attribute_ss", field_names[i]); }
|
31
|
-
// }
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
function processDelete(cmd) {
|
36
|
-
// no-op
|
37
|
-
}
|
38
|
-
|
39
|
-
function processMergeIndexes(cmd) {
|
40
|
-
// no-op
|
41
|
-
}
|
42
|
-
|
43
|
-
function processCommit(cmd) {
|
44
|
-
// no-op
|
45
|
-
}
|
46
|
-
|
47
|
-
function processRollback(cmd) {
|
48
|
-
// no-op
|
49
|
-
}
|
50
|
-
|
51
|
-
function finish() {
|
52
|
-
// no-op
|
53
|
-
}
|
@@ -1,70 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
* Licensed to the Apache Software Foundation (ASF) under one or more
|
3
|
-
* contributor license agreements. See the NOTICE file distributed with
|
4
|
-
* this work for additional information regarding copyright ownership.
|
5
|
-
* The ASF licenses this file to You under the Apache License, Version 2.0
|
6
|
-
* (the "License"); you may not use this file except in compliance with
|
7
|
-
* the License. You may obtain a copy of the License at
|
8
|
-
*
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
*
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
* See the License for the specific language governing permissions and
|
15
|
-
* limitations under the License.
|
16
|
-
-->
|
17
|
-
|
18
|
-
<!--
|
19
|
-
Simple transform of Solr query response into Solr Update XML compliant XML.
|
20
|
-
When used in the xslt response writer you will get UpdaateXML as output.
|
21
|
-
But you can also store a query response XML to disk and feed this XML to
|
22
|
-
the XSLTUpdateRequestHandler to index the content. Provided as example only.
|
23
|
-
See http://wiki.apache.org/solr/XsltUpdateRequestHandler for more info
|
24
|
-
-->
|
25
|
-
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
|
26
|
-
<xsl:output media-type="text/xml" method="xml" indent="yes"/>
|
27
|
-
|
28
|
-
<xsl:template match='/'>
|
29
|
-
<add>
|
30
|
-
<xsl:apply-templates select="response/result/doc"/>
|
31
|
-
</add>
|
32
|
-
</xsl:template>
|
33
|
-
|
34
|
-
<!-- Ignore score (makes no sense to index) -->
|
35
|
-
<xsl:template match="doc/*[@name='score']" priority="100">
|
36
|
-
</xsl:template>
|
37
|
-
|
38
|
-
<xsl:template match="doc">
|
39
|
-
<xsl:variable name="pos" select="position()"/>
|
40
|
-
<doc>
|
41
|
-
<xsl:apply-templates>
|
42
|
-
<xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>
|
43
|
-
</xsl:apply-templates>
|
44
|
-
</doc>
|
45
|
-
</xsl:template>
|
46
|
-
|
47
|
-
<!-- Flatten arrays to duplicate field lines -->
|
48
|
-
<xsl:template match="doc/arr" priority="100">
|
49
|
-
<xsl:variable name="fn" select="@name"/>
|
50
|
-
|
51
|
-
<xsl:for-each select="*">
|
52
|
-
<xsl:element name="field">
|
53
|
-
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
54
|
-
<xsl:value-of select="."/>
|
55
|
-
</xsl:element>
|
56
|
-
</xsl:for-each>
|
57
|
-
</xsl:template>
|
58
|
-
|
59
|
-
|
60
|
-
<xsl:template match="doc/*">
|
61
|
-
<xsl:variable name="fn" select="@name"/>
|
62
|
-
|
63
|
-
<xsl:element name="field">
|
64
|
-
<xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>
|
65
|
-
<xsl:value-of select="."/>
|
66
|
-
</xsl:element>
|
67
|
-
</xsl:template>
|
68
|
-
|
69
|
-
<xsl:template match="*"/>
|
70
|
-
</xsl:stylesheet>
|