Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Custom search results for global search

Avatar

Avatar
Validate 1
Level 1
ShivaniTandon
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ShivaniTandon
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
ShivaniTandon
Level 1

17-02-2021

How to restrict the assets of a particular folder from appearing in global or filter search results based on role of a user

View Entire Topic

Avatar

Avatar
Ignite 1
Level 4
davidjgonzalezzzz
Level 4

Likes

54 likes

Total Posts

60 posts

Correct Reply

20 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
Level 4
davidjgonzalezzzz
Level 4

Likes

54 likes

Total Posts

60 posts

Correct Reply

20 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
davidjgonzalezzzz
Level 4

17-02-2021

Another interesting solution could be the following:

 

1. For each role/path combo - create a  Hidden predicate on the Assets Search Form 

1. Use the excludespaths QueryBuilder predicate to exclude a specific path/path-pattern -- test this out as excludepaths seems like it might be a little slower, you might be able to figure out how to do the inverse using the paths predicate as well.

1. Permission those hidden predicates nodes in the JCR to be only read-able by members in the role that shouldn't be able to see assets in those folders.

 

This is effectively selectively toggling the inclusion of Search Form predicates that exclude paths, based on the users permission (which should be mapped to a user group/role).

 

As I mentioned, performance test this to make sure it's OK, but you should be able to work something out w/ this that only affects OOTB Assets Search experience. Also, double-check all the places users might search from to ensure these predicates are evaluated there (ex. I don't think they're evaluated from the Page Editor sidebar) ... If you need something TRULY global, i think ACLs on the folders/assets themselves are going to end up being your answer.

 

 

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/querybuilder-predicate-referen...

2021-02-17 at 1.18 PM.png