Commit 30d15c07 authored by Liang Ding's avatar Liang Ding

模版变量:管理员

parent e120dc6d
......@@ -7,6 +7,7 @@ therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
<word>admin</word>
<word>Favicon</word>
</spellchecker-wordlist>
</project-shared-configuration>
......@@ -20,7 +20,7 @@ package org.b3log.solo.model;
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:dongxu.wang@acm.org">Dongxu Wang</a>
* @version 1.3.5.1, Jun 13, 2015
* @version 1.4.5.1, Nov 1, 2015
* @since 0.3.1
*/
public final class Common {
......@@ -174,6 +174,11 @@ public final class Common {
* Key of current user.
*/
public static final String CURRENT_USER = "currentUser";
/**
* Key of admin user.
*/
public static final String ADMIN_USER = "adminUser";
/**
* Key of enabled multiple user support.
......
......@@ -70,7 +70,7 @@ import org.json.JSONObject;
* Filler utilities.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.3.11.11, Aug 3, 2015
* @version 1.4.11.11, Nov 1, 2015
* @since 0.3.1
*/
@Service
......@@ -662,12 +662,10 @@ public class Filler {
final JSONObject result = userRepository.get(query);
final JSONArray users = result.getJSONArray(Keys.RESULTS);
final List<JSONObject> userList = CollectionUtils.jsonArrayToList(users);
dataModel.put(User.USERS, userList);
for (final JSONObject user : userList) {
user.remove(User.USER_EMAIL);
user.remove(User.USER_PASSWORD);
}
final JSONObject admin = userRepository.getAdmin();
dataModel.put(Common.ADMIN_USER, admin);
final String skinDirName = (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME);
......
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