diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-12-08 11:45:26 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-12-08 11:45:26 +0200 |
commit | 22244ddf3fdadae2311df505c7d874487f8b00a0 (patch) | |
tree | 642bf7457a4bd8a706fa8be30209ccfe4e76ff0e | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-admin_notes_for_user.tar.gz |
Create admin notes for usersadmin_notes_for_user
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/controllers/admin/users_controller.rb | 2 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 6 | ||||
-rw-r--r-- | db/migrate/20151208110020_add_note_to_users.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index bbd752fb1d0..5551dbb0ea3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -18,6 +18,7 @@ v 8.3.0 (unreleased) - Fix 500 error when creating a merge request that removes a submodule - Run custom Git hooks when branch is created or deleted. - Fix bug when simultaneously accepting multiple MRs results in MRs that are of "merged" status, but not merged to the target branch + - Add ability to create a note for user by admin v 8.2.3 - Fix application settings cache not expiring after changes (Stan Hu) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index d7c927d444c..4e4e5eb07b9 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -148,7 +148,7 @@ class Admin::UsersController < Admin::ApplicationController :email, :remember_me, :bio, :name, :username, :skype, :linkedin, :twitter, :website_url, :color_scheme_id, :theme_id, :force_random_password, :extern_uid, :provider, :password_expires_at, :avatar, :hide_no_ssh_key, :hide_no_password, - :projects_limit, :can_create_group, :admin, :key_id + :projects_limit, :can_create_group, :admin, :key_id, :note ) end diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index e18dd9bc905..6b9edaac364 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -81,6 +81,12 @@ = f.label :website_url, 'Website', class: 'control-label' .col-sm-10= f.text_field :website_url, class: 'form-control' + %fieldset + %legend Admin notes + .form-group + = f.label :note, 'Note', class: 'control-label' + .col-sm-10= f.text_area :note, class: 'form-control' + .form-actions - if @user.new_record? = f.submit 'Create user', class: "btn btn-create" diff --git a/db/migrate/20151208110020_add_note_to_users.rb b/db/migrate/20151208110020_add_note_to_users.rb new file mode 100644 index 00000000000..52b1cdbb70d --- /dev/null +++ b/db/migrate/20151208110020_add_note_to_users.rb @@ -0,0 +1,5 @@ +class AddNoteToUsers < ActiveRecord::Migration + def change + add_column :users, :note, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index fb59e187625..1a0ec5b2d87 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151203162133) do +ActiveRecord::Schema.define(version: 20151208110020) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -815,6 +815,7 @@ ActiveRecord::Schema.define(version: 20151203162133) do t.integer "consumed_timestep" t.integer "layout", default: 0 t.boolean "hide_project_limit", default: false + t.text "note" end add_index "users", ["admin"], name: "index_users_on_admin", using: :btree |