Fix adding new Ldap links

parent 7efb958c
......@@ -52,6 +52,11 @@
%li It will change web url for access group and group projects.
%li It will change the git path to repositories under this group.
.form-actions
= f.submit 'Save changes', class: "btn btn-primary"
= link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel"
- if @group.persisted?
%section.ldap-group-links
%fieldset
%legend Current LDAP links
......@@ -63,11 +68,11 @@
= ldap_group_link.cn
%small.light== as #{ldap_group_link.human_access}
.pull-right
= link_to group_ldap_group_link_path(@group, ldap_group_link), method: :destroy, class: 'btn btn-danger btn-small' do
= link_to group_ldap_group_link_path(@group, ldap_group_link), method: :delete, class: 'btn btn-danger btn-small' do
= fa_icon('unlink', text: 'unlink')
- else
%p No links yet
= form_for [@group, @group.ldap_group_links.new] do |f|
%fieldset
%legend Add new LDAP link
%div.form-holder
......@@ -75,17 +80,17 @@
= f.label :ldap_cn, class: 'control-label' do
LDAP Group cn
.col-sm-10
= f.hidden_field :ldap_cn, placeholder: "Ex. QA group", class: "xxlarge ajax-ldap-groups-select input-mn-300"
= f.hidden_field :cn, placeholder: "Ex. QA group", class: "xxlarge ajax-ldap-groups-select input-mn-300"
.help-block
Synchronize #{@group.name}'s members with this LDAP group.
%br
If you select an LDAP group you do not belong to you will lose ownership of #{@group.name}.
.form-group.clearfix
= f.label :ldap_access, class: 'control-label' do
= f.label :group_access, class: 'control-label' do
LDAP Access
.col-sm-10
= f.select :ldap_access, options_for_select(UsersGroup.group_access_roles, @group.ldap_access)
= f.select :group_access, options_for_select(UsersGroup.group_access_roles)
.help-block
Default, minimum permission level for LDAP group members of #{@group.name}.
%br
......
......@@ -166,8 +166,8 @@ Gitlab::Application.routes.draw do
end
resources :users_groups, only: [:create, :update, :destroy]
resources :ldap_group_links, only: [:create, :destroy]
scope module: :groups do
resources :ldap_group_links, only: [:create, :destroy]
resource :avatar, only: [:destroy]
resources :milestones
end
......
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