Restrict Now Assist AI Search results to specific users

simonthomas
Tera Expert

I am preparing to trial Now Assist in AI Search on our Employee Center for a limited group of users. I have enabled Now Assist Multi-Content Response under Now Assist in AI Search and it works well. However, I'm looking for a way to restrict who can see the "Answer generated by Now Assist" panel at the top of the search page. How can I configure this?

1 ACCEPTED SOLUTION

simonthomas
Tera Expert

I have created a solution that is working. The EC Search widget has a parameter

searchFromChat that turns off the Now Assist search results if set to false.

 

1. Clone the EC Search widget

2. Add the following code to the cloned widget:

Server script

data.isAdmin = gs.getUser().hasRole('admin');

 

Client controller

	c.$onInit = function () {
		var isAdmin = c.data.isAdmin;
		if(!isAdmin){
			// Get the parameter from the URL
			var paramValue = $location.search().searchFromChat;

			// If the parameter is missing or empty, redirect
			if (!paramValue) {
				$window.location.href += '&searchFromChat=false';
			}
		}
	};

 

3. Add the cloned widget to the esc_search page.

4. Set the Can View user criteria on the original EC Search widget to my trial group.

5. Set the Cannot View user criteria on the cloned widget to my trial group.

Note: The cloned widget specifically checks for users with the admin role as the user criteria alone wouldn't prevent admins from viewing the cloned widget.

View solution in original post

5 REPLIES 5

rpriyadarshy
Mega Guru

I'm looking for a way to restrict who can see the "Answer generated by Now Assist" panel at the top of the search page. How can I configure this?--> Did you tried Controlling this by giving now_assist_user Role to specific user to access Panel Output.

 

Regards

RP

I don't have a role available called now_assist_user.

abirakundu23
Mega Sage

Hi @simonthomas ,
By default Now Assist Panel visible for specific role - "now_assist_panel_user ". Please restrict by using this role for specific users.

Please mark helpful and correct answer if it's worthy for you.

I have tested as users without the now_assist_panel_user role and they still see the AI search results. I've attached a screenshot of the section I'm trying to hide.