Commit 71627198 authored by Leon Roy's avatar Leon Roy Committed by leonroy

RESOLVED - issue OF-681: Add ability to search plugin to be able to restrict...

RESOLVED - issue OF-681: Add ability to search plugin to be able to restrict searching for users to only the group a user is in
http://issues.igniterealtime.org/browse/OF-681

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13705 b35dd754-fafc-0310-a699-88a17e54d16e
parent 6a4af76e
......@@ -44,6 +44,11 @@
Search Plugin Changelog
</h1>
<p><b>1.5.2</b> -- July 4, 2013</p>
<ul>
<li>OF-681 - Add ability to search plugin to be able to restrict searching for users to only the group a user is in.</li>
</ul>
<p><b>1.5.1</b> -- January 2, 2010</p>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-45'>OF-45</a>] - Added Lithuanian translation by Rytis Umbrasas.</li>
......
......@@ -5,8 +5,8 @@
<name>Search</name>
<description>Provides support for Jabber Search (XEP-0055)</description>
<author>Ryan Graham</author>
<version>1.5.1</version>
<date>1/2/2010</date>
<version>1.5.2</version>
<date>7/4/2013</date>
<minServerVersion>3.7.0</minServerVersion>
<adminconsole>
......
......@@ -68,4 +68,11 @@ search.props.edit.form.searchable_fields_details=Use the form below to enable wh
search.props.edit.form.fields=Fields
search.props.edit.form.save_properties=Save Properties
search.props.edit.form.search_scope=Search Scope
search.props.edit.form.search_scope_directions=Use the form below to restrict the search scope so users can search for anyone or only users in the same group.
search.props.edit.form.search_scope_anyone=Anyone
search.props.edit.form.search_scope_anyone_details=Clients will be able to search for all users.
search.props.edit.form.search_scope_groups=Group
search.props.edit.form.search_scope_groups_details=Clients will be able to only search for users in their group.
search.service_unavailable=This service is unavailable.
......@@ -69,5 +69,12 @@ search.props.edit.form.searchable_fields_details=\u017demiau esan\u010dia forma
search.props.edit.form.fields=Laukai
search.props.edit.form.save_properties=I\u0161saugoti nuostatas
search.props.edit.form.search_scope=Search Scope
search.props.edit.form.search_scope_directions=Use the form below to restrict the search scope so users can search for anyone or only users in the same group.
search.props.edit.form.search_scope_anyone=Anyone
search.props.edit.form.search_scope_anyone_details=Clients will be able to search for all users.
search.props.edit.form.search_scope_groups=Group
search.props.edit.form.search_scope_groups_details=Clients will be able to only search for users in their group.
search.service_unavailable=Paslauga negalima.
......@@ -48,4 +48,11 @@ search.props.edit.form.searchable_fields_details=Utilize o formul\u00e1rio abaix
search.props.edit.form.fields=Campos
search.props.edit.form.save_properties=Gravar Op\u00e7\u00f5es
search.props.edit.form.search_scope=Search Scope
search.props.edit.form.search_scope_directions=Use the form below to restrict the search scope so users can search for anyone or only users in the same group.
search.props.edit.form.search_scope_anyone=Anyone
search.props.edit.form.search_scope_anyone_details=Clients will be able to search for all users.
search.props.edit.form.search_scope_groups=Group
search.props.edit.form.search_scope_groups_details=Clients will be able to only search for users in their group.
search.service_unavailable=Este servi\u00e7o est\u00e1 indispon\u00edvel.
......@@ -13,7 +13,8 @@
boolean success = request.getParameter("success") != null;
String searchName = ParamUtils.getParameter(request, "searchname");
boolean searchEnabled = ParamUtils.getBooleanParameter(request, "searchEnabled");
boolean groupOnly = ParamUtils.getBooleanParameter(request, "groupOnly");
SearchPlugin plugin = (SearchPlugin) XMPPServer.getInstance().getPluginManager().getPlugin("search");
// Handle a save
......@@ -34,7 +35,7 @@
}
}
plugin.setExcludedFields(excludedFields);
plugin.setGroupOnly(groupOnly);
response.sendRedirect("search-props-edit-form.jsp?success=true");
return;
}
......@@ -50,6 +51,7 @@
searchEnabled = plugin.getServiceEnabled();
Collection<String> searchableFields = plugin.getFilteredSearchFields();
groupOnly = plugin.isGroupOnly();
%>
<html>
......@@ -169,6 +171,38 @@
<br>
<div class="jive-contentBoxHeader"><fmt:message key="search.props.edit.form.search_scope" /></div>
<div class="jive-contentBox">
<p>
<fmt:message key="search.props.edit.form.search_scope_directions" />
</p>
<table cellpadding="3" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="1%">
<input type="radio" name="groupOnly" value="false" id="rb-grouponly-01"
<%= ((!groupOnly) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb-grouponly-01"><b><fmt:message key="search.props.edit.form.search_scope_anyone" /></b></label> - <fmt:message key="search.props.edit.form.search_scope_anyone_details" />
</td>
</tr>
<tr>
<td width="1%">
<input type="radio" name="groupOnly" value="true" id="rb-grouponly-02"
<%= ((groupOnly) ? "checked" : "") %>>
</td>
<td width="99%">
<label for="rb-grouponly-02"><b><fmt:message key="search.props.edit.form.search_scope_groups" /></b></label> - <fmt:message key="search.props.edit.form.search_scope_groups_details" />
</td>
</tr>
</tbody>
</table>
</div>
<br>
<input type="submit" value="<fmt:message key="search.props.edit.form.save_properties" />">
</form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment