Skip to content

Commit

Permalink
Merge pull request #494 from diggsweden/DIGG-467
Browse files Browse the repository at this point in the history
 Digg 467 Public true on newSolrQuery
  • Loading branch information
AlessandroGasperini authored Nov 7, 2024
2 parents a6e36e1 + 18f66e0 commit e1173f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/navigation/MainNav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const MainNav: FC<MainNavProps> = ({ setOpenSideBar, openSideBar }) => {
className={`${
openSearch
? "hidden lg:block"
: "min-w-0 max-h-[2rem] w-full max-w-[10rem] md:h-[2.75rem] md:w-[15.5rem]"
: "max-h-[2rem] w-full min-w-0 max-w-[10rem] md:h-[2.75rem] md:w-[15.5rem]"
}`}
/>
)}
Expand Down
2 changes: 2 additions & 0 deletions providers/EntrystoreProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export const EntrystoreProvider: React.FC<EntrystoreProviderProps> = ({
const datasets = await es
.newSolrQuery()
.rdfType(["dcat:Dataset", "dcat:DataService"])
.publicRead(true)
.uriProperty("dcterms:conformsTo", resourceURI)
.getEntries();

Expand All @@ -145,6 +146,7 @@ export const EntrystoreProvider: React.FC<EntrystoreProviderProps> = ({
hasResourceUri || entryUri,
)
.rdfType(["dcterms:Standard", "prof:Profile"])
.publicRead(true)
.getEntries();

const datasetArr = await Promise.all(
Expand Down
4 changes: 4 additions & 0 deletions utilities/entryScape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ export class EntryScape {
const es = this.getEntryStore();

let esQuery = es.newSolrQuery();
esQuery.publicRead(true);
let searchList: any;

const term = "http://www.w3.org/2004/02/skos/core#Concept";
Expand Down Expand Up @@ -654,12 +655,15 @@ export class EntryScape {
const termSearch = request.esRdfTypes && request.esRdfTypes[0] === term;
const prefLabel = es
.newSolrQuery()
.publicRead(true)
.literalProperty("skos:prefLabel", query).properties[0].md5;
const altLabel = es
.newSolrQuery()
.publicRead(true)
.literalProperty("skos:altLabel", query).properties[0].md5;
const hiddenLabel = es
.newSolrQuery()
.publicRead(true)
.literalProperty("skos:hiddenLabel", query).properties[0].md5;

queryUrl = queryUrl.replace(
Expand Down
1 change: 1 addition & 0 deletions utilities/entrystoreUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export const getLocalizedValue = async (
export const resourcesSearch = (resources: string[], es: any): Promise<any> => {
return new Promise<any>((resolve) => {
let esQuery = es.newSolrQuery();
esQuery.publicRead(true);
esQuery
.resource(resources, null)
.getEntries(0)
Expand Down

0 comments on commit e1173f8

Please sign in to comment.