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. ...@@ -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. 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"> <spellchecker-wordlist xmlns="http://www.netbeans.org/ns/spellchecker-wordlist/1">
<word>admin</word>
<word>Favicon</word> <word>Favicon</word>
</spellchecker-wordlist> </spellchecker-wordlist>
</project-shared-configuration> </project-shared-configuration>
...@@ -20,7 +20,7 @@ package org.b3log.solo.model; ...@@ -20,7 +20,7 @@ package org.b3log.solo.model;
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="mailto:dongxu.wang@acm.org">Dongxu Wang</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 * @since 0.3.1
*/ */
public final class Common { public final class Common {
...@@ -175,6 +175,11 @@ public final class Common { ...@@ -175,6 +175,11 @@ public final class Common {
*/ */
public static final String CURRENT_USER = "currentUser"; public static final String CURRENT_USER = "currentUser";
/**
* Key of admin user.
*/
public static final String ADMIN_USER = "adminUser";
/** /**
* Key of enabled multiple user support. * Key of enabled multiple user support.
*/ */
......
...@@ -70,7 +70,7 @@ import org.json.JSONObject; ...@@ -70,7 +70,7 @@ import org.json.JSONObject;
* Filler utilities. * Filler utilities.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @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 * @since 0.3.1
*/ */
@Service @Service
...@@ -662,12 +662,10 @@ public class Filler { ...@@ -662,12 +662,10 @@ public class Filler {
final JSONObject result = userRepository.get(query); final JSONObject result = userRepository.get(query);
final JSONArray users = result.getJSONArray(Keys.RESULTS); final JSONArray users = result.getJSONArray(Keys.RESULTS);
final List<JSONObject> userList = CollectionUtils.jsonArrayToList(users); final List<JSONObject> userList = CollectionUtils.jsonArrayToList(users);
dataModel.put(User.USERS, userList); dataModel.put(User.USERS, userList);
for (final JSONObject user : userList) {
user.remove(User.USER_EMAIL); final JSONObject admin = userRepository.getAdmin();
user.remove(User.USER_PASSWORD); dataModel.put(Common.ADMIN_USER, admin);
}
final String skinDirName = (String) request.getAttribute(Keys.TEMAPLTE_DIR_NAME); 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