Commit 4b3fa67c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add ldap_cn field to Group

parent 2c8ee981
......@@ -19,6 +19,8 @@ class Group < Namespace
has_many :project_group_links, dependent: :destroy
has_many :shared_projects, through: :project_group_links, source: 'project'
attr_accessible :ldap_cn
after_create :add_owner
def human_name
......
......@@ -9,6 +9,8 @@
= link_to '#tab-projects', 'data-toggle' => 'tab' do
%i.icon-folder-close
Projects
%li
= link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
%li
= link_to 'Transfer', '#tab-transfer', 'data-toggle' => 'tab'
%li
......@@ -65,6 +67,20 @@
- if @group.projects.blank?
%p.nothing_here_message This group has no projects yet
.tab-pane#tab-ldap
.ui-box
.title LDAP group settings
%div.form-holder
= form_for @group do |f|
.clearfix
= f.label :ldap_cn do
LDAP Group cn
.input
= f.text_field :ldap_cn, placeholder: "Ex. QA group", class: "xxlarge left"
.form-actions
= f.submit 'Save group', class: "btn btn-save"
.tab-pane#tab-transfer
.ui-box.ui-box-danger
.title Transfer group
......
class AddLdapSettingsToGroup < ActiveRecord::Migration
def change
add_column :namespaces, :ldap_cn, :string, null: true
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130711063759) do
ActiveRecord::Schema.define(:version => 20130802124933) do
create_table "deploy_keys_projects", :force => true do |t|
t.integer "deploy_key_id", :null => false
......@@ -129,6 +129,7 @@ ActiveRecord::Schema.define(:version => 20130711063759) do
t.datetime "updated_at", :null => false
t.string "type"
t.string "description", :default => "", :null => false
t.string "ldap_cn"
end
add_index "namespaces", ["name"], :name => "index_namespaces_on_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