Show user and global search bookmarks only

Since Issue 9515: Allow sharing view search to all users - Tryton issue tracker Tryton allows sharing searches among users.

It works by allowing only users in the Administrator group to see all searches so they can select which searches can be seen by all users by simply removing the user from the search.

While it’s ok to see all the bookmarks in the “Administration > User Interface > View Search” the problem is that a user in the administrator group will find all searches in her bookmark button too. That can be quite annoying for that user since there can be lots of searches she does not want to see.

I propose to change the domain in get_search() so only user and global bookmarks are shown.

Thoughts?

For me it will break modularity to hard code a domain there.
Indeed for me the problem is having an admin user doing other stuffs than administration.

Maybe we could obtain the domain from a method such as get_search_domain() so it can be overriden if necessary.

The user admin exists to be used from the UI so we should make sure the the UI works correctly for all users.

But access rules can be modified from the UI.

It works correctly for the administration tasks.