{"id":1504,"date":"2011-05-24T20:15:39","date_gmt":"2011-05-24T20:15:39","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=1504"},"modified":"2011-05-24T20:37:32","modified_gmt":"2011-05-24T20:37:32","slug":"search-scopes","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/search-scopes","title":{"rendered":"Search Scopes"},"content":{"rendered":"<p>Search Scopes are a handy way to make it easier for your users to find things, and can be particularly helpful clarifying where they do and do not have admininistrative rights. Here&#8217;s an example of the Search Scopes I&#8217;ve provided for IT admins on the Users portal page. Admins can search through all users, or just the ones they manage. They can also view users who fall into particular categories.<br \/>\n<a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/person.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1505 alignnone\" title=\"person\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/person.jpg\" alt=\"\" width=\"153\" height=\"140\" \/><\/a><br \/>\n<!--more--><\/p>\n<h3>Example: Creating a Search Scope on the Users page<\/h3>\n<p>Here&#8217;s how I made the &#8220;BPOS Active Users&#8221; search scope.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>To create a Search Scope go to Administration -&gt; Search Scopes -&gt; New.<br \/>\nHere I have added two usage keywords:<\/p>\n<ul>\n<li>&#8220;Person&#8221; states that you want the search scope to appear on the Users page, and<\/li>\n<li>&#8220;ITAdminUI&#8221; is a keyword I have defined for use by people with an IT Admin role. There is more on how you set the appropriate permissions below. If you want the search scope to be available to all users then you can instead use &#8220;BasicUI&#8221; here.<\/li>\n<\/ul>\n<p>I also set the order to 3 to control where I want the search scope to appear in the drop-down list pictured above.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope1.jpg\"><\/a><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope.jpg\"><\/a><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope1.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1507\" title=\"userscope\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope1.jpg\" alt=\"\" width=\"400\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope1.jpg 644w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope1-300x201.jpg 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>On the next page, list the attributes that you want to search on when using the scope.<br \/>&nbsp;<br \/>\nThe most important part is the filter. Rather annoyingly you can&#8217;t use membership of a Set here, so you may find yourself replicating a definition you&#8217;ve already made elsewhere.<br \/>&nbsp;<br \/>\nNote the trick I&#8217;ve done with &#8220;(EmployeeID != &#8221;)&#8221;. This corresponds to objects <em>with <\/em>an EmployeeID &#8211; however because I&#8217;ve only allowed IT Admins to read the EmployeeID of users they administer, this has the resultant effect of listing only BPOS Active Users <em>that the viewer administers<\/em>.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope2.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1508\" title=\"userscope2\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope2.jpg\" alt=\"\" width=\"400\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope2.jpg 591w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope2-300x160.jpg 300w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>Finally I specify the object type that should be returned by a search, and the columns I want to see. The columns should be the same as in the &#8220;All Users&#8221; search scope, so simplest just to copy from there.<br \/>&nbsp;<br \/>\nYou can change the columns to be displayed by modifying this Attribute field, but I&#8217;m pretty sure things will work better if you make the colums the same across all search scopes appearing on the Users page.<br \/>&nbsp;<br \/>\nSubmit the new Search Scope.<br \/>&nbsp;<br \/>\nYou will need to do an IISRESET before the search scope appears.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope3.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1509\" title=\"userscope3\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope3.jpg\" alt=\"\" width=\"400\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope3.jpg 636w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/userscope3-300x148.jpg 300w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>Access permissions for the ITAdminUI Usage Keyword<\/h4>\n<p>Above I used the keyword &#8220;ITAminUI&#8221; because I want the search scope to be available only to IT Administrators. If, instead, you used &#8220;BasicUI&#8221; you won&#8217;t need to follow this bit because the scope is already available to everyone.<\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<td>Create a Set of all Search Scopes with your selected keyword &#8211; in my case &#8220;ITAdminUI&#8221;.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/set.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1510\" title=\"set\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/set.jpg\" alt=\"\" width=\"400\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/set.jpg 538w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/set-300x153.jpg 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/a><\/td>\n<\/tr>\n<tr>\n<td>Create an MPR which gives Read permission for this Set to the users who you want to be able to use the Search Scope.<\/td>\n<td><a href=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/MPR.jpg\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1511\" title=\"MPR\" src=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/MPR.jpg\" alt=\"\" width=\"400\" srcset=\"https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/MPR.jpg 596w, https:\/\/www.wapshere.com\/missmiis\/wp-content\/uploads\/2011\/05\/MPR-300x156.jpg 300w\" sizes=\"(max-width: 596px) 100vw, 596px\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Another example: Distribution List Search Scope<\/h3>\n<p>I&#8217;m not going to go through the whole thing again, however I wanted to mention the Usage Keywords that you need to use to add a search scope that appears on the Distribution Lists page. I&#8217;m not exactly sure why but I found that I needed all of the following:<\/p>\n<ul>\n<li>Distribution<\/li>\n<li>Group<\/li>\n<li>AllDGs<\/li>\n<\/ul>\n<p>plus the keyword that gives the access permissions, eg.,<\/p>\n<ul>\n<li>BasicUI<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Search Scopes are a handy way to make it easier for your users to find things, and can be particularly helpful clarifying where they do and do not have admininistrative rights. Here&#8217;s an example of the Search Scopes I&#8217;ve provided for IT admins on the Users portal page. Admins can search through all users, or&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[42],"tags":[],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-fim-2010"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-og","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=1504"}],"version-history":[{"count":17,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1528,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1504\/revisions\/1528"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}