Merge pull request #23 from treasure-data/changeme_notification

Changeme notification
This commit is contained in:
uu59 2014-06-03 14:56:20 +09:00
commit 9c8bcccdcd
7 changed files with 13 additions and 1 deletions

View File

@ -9,6 +9,9 @@ class SessionsController < ApplicationController
return render :new
end
sign_in user
if session_params[:password] == Settings.default_password
flash[:warning] = t('terms.changeme_password')
end
redirect_to root_path
end

View File

@ -96,6 +96,7 @@
</nav>
<div id="page-wrapper">
<%= render partial: "shared/flash" %>
<% if content_for?(:page_head) %>
<div class="row">
<div class="col-lg-12">

View File

@ -0,0 +1,5 @@
.row
- if flash[:warning]
%p.alert.alert-warning
=raw flash[:warning]

View File

@ -1,4 +1,5 @@
defaults: &defaults
default_password: changeme
recommended_plugins:
- category: filter
name: "rewrite-tag-filter"

View File

@ -27,6 +27,7 @@ en:
installing: "Installing: %{target}"
uninstalling: "Uninstalling: %{target}"
search: Search
changeme_password: '<a href="/user">Change the password</a> from default for your security'
destroy_confirm_title: "%{target} Deletion"
destroy_confirm_body: |
Really delete?

View File

@ -27,6 +27,7 @@ ja:
installing: "インストール中: %{target}"
uninstalling: "アンインストール中: %{target}"
search: 検索
changeme_password: 'パスワードを初期設定から<a href="/user">変更</a>してください'
destroy_confirm_title: "%{target}を削除"
destroy_confirm_body: |
削除しますか?

View File

@ -7,5 +7,5 @@
# Mayor.create(name: 'Emanuel', city: cities.first)
unless User.exists?
User.create!(name: "admin", password: "changeme")
User.create!(name: "admin", password: Settings.default_password)
end