Suwon Chae 2017-08-21
site: Provide option to show email or not
@641d2d0daed6e33bebe6a1212427bce5e7db2b12
app/controllers/Application.java
--- app/controllers/Application.java
+++ app/controllers/Application.java
@@ -37,6 +37,7 @@
     public static String GUEST_USER_LOGIN_ID_PREFIX  = play.Configuration.root().getString("application.guest.user.login.id.prefix ", "");
     public static String LOGIN_PAGE_LOGINID_PLACEHOLDER  = play.Configuration.root().getString("application.login.page.loginId.placeholder", "");
     public static String LOGIN_PAGE_PASSWORD_PLACEHOLDER  = play.Configuration.root().getString("application.login.page.password.placeholder", "");
+    public static boolean SHOW_USER_EMAIL = play.Configuration.root().getBoolean("application.show.user.email", true);
 
     @AnonymousCheck
     public static Result index() {
app/views/user/view.scala.html
--- app/views/user/view.scala.html
+++ app/views/user/view.scala.html
@@ -54,7 +54,9 @@
                 <div class="whoami usf-group">
                     <span class="name">@user.name</span>
                     <span class="loginid">@{"@"}@user.loginId</span>
-                    <span class="email">@user.email</span>
+                    @if(Application.SHOW_USER_EMAIL){
+                        <span class="email">@user.email</span>
+                    }
                     @if(user != null && requestHeader.session != null && user.loginId == UserApp.currentUser.loginId){
                     <div class="edit">
                         <a href="@routes.UserApp.editUserInfoForm()" class="ybtn ybtn-default ybtn-mini"><i class="yobicon-edit"></i> @Messages("userinfo.editProfile")</a>
conf/application.conf.default
--- conf/application.conf.default
+++ conf/application.conf.default
@@ -310,6 +310,10 @@
 # default: "public"
 project.default.scope.when.create = "public"
 
+# Display user email
+# default: true
+application.show.user.email = true
+
 # Google Analytics
 # ~~~~~~~~~~~~~~~~~
 # This data is used to better understand how users interact with the Web UI which gives us valuable information
Add a comment
List