Skip to content

Commit

Permalink
site: Provide option to show email or not
Browse files Browse the repository at this point in the history
  • Loading branch information
Suwon Chae authored and doortts committed Sep 24, 2017
1 parent 76f5f5d commit 641d2d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class Application extends Controller {
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() {
Expand Down
4 changes: 3 additions & 1 deletion app/views/user/view.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ <h3>@Messages("userinfo.profile")</h3>
<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>
Expand Down
4 changes: 4 additions & 0 deletions conf/application.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ application.hide.project.listing = false
# 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
Expand Down

0 comments on commit 641d2d0

Please sign in to comment.