Forums / Setup & design / Search per siteaccess?

Search per siteaccess?

Author Message

Eivind Marienborg

Monday 25 July 2005 3:57:04 am

Greetings :)

Here's the case:
My site has two siteaccesses, one for regular users, and one for admins. I have personal information like name, adress etc in the user class.

I want my regular users to be able to search in usernames, but <b>not</b> in realnames and adresses. But I still want the admins to be able to search realnames and adresses.

I can't think of anything clever here. Disabling the attributes for searching will disable the admins from searching in it too, so that's out of the question.

An approach could be to have separate search tables, but that doesn't sound like the easy way out.. ;)

Any ideas, anyone?

Eivind :)

Nabil Alimi

Monday 25 July 2005 6:31:55 am

Can't you achieve this by having 2 search forms each one searching in different fields ?

(Or maybe I didnt catch your problem at all.^^)

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Mikael Johansson

Monday 25 July 2005 11:11:43 am

Maybe you could override the search result template at the user site and filter out "illegal" search options?

In other words: override
design/standard/templates/content/advancedsearch.tpl with a template that does not include searchresult.tpl if illegal options are set.

Mikael Johansson, Sweden

Eivind Marienborg

Monday 25 July 2005 11:25:01 am

That's not as easy as it seems.. I don't only have to prevent sensitive information to be displayed, I also need it not to be revealed.

Let's say someone searches for John Hansen, and gets one hit. Then they can be sure that John Hansen is registered.

So, if I am to do this in simple template code, I need to know what attribute the search matched, and do the elimination on that. But that doesn't sound like the easy way out either.. ;)

But thanks for the input, though :)