Refactor group/edit LDAP sync page

parent 675b8c9d
...@@ -2,6 +2,9 @@ class Groups::LdapGroupLinksController < ApplicationController ...@@ -2,6 +2,9 @@ class Groups::LdapGroupLinksController < ApplicationController
before_action :group before_action :group
before_action :authorize_admin_group! before_action :authorize_admin_group!
def index
end
def create def create
ldap_group_link = @group.ldap_group_links.build(ldap_group_link_params) ldap_group_link = @group.ldap_group_links.build(ldap_group_link_params)
if ldap_group_link.save if ldap_group_link.save
......
...@@ -59,3 +59,4 @@ ...@@ -59,3 +59,4 @@
- if @group.persisted? - if @group.persisted?
%h3.page-title LDAP Synchronizations %h3.page-title LDAP Synchronizations
= render 'ldap_group_links/form', group: @group = render 'ldap_group_links/form', group: @group
= render 'ldap_group_links/ldap_group_links', group: @group
...@@ -7,4 +7,8 @@ ...@@ -7,4 +7,8 @@
= link_to projects_group_path(@group) do = link_to projects_group_path(@group) do
%i.icon-folder-close %i.icon-folder-close
Projects Projects
= nav_link(controller: [:groups, :ldap_group_links]) do
= link_to group_ldap_group_links_path(@group) do
%i.icon-exchange
LDAP Sync
.row
.col-md-2= render 'groups/settings_nav'
.col-md-10
%h3.page-title LDAP Synchronizations
= render 'ldap_group_links/form', group: @group
= render 'ldap_group_links/ldap_group_links', group: @group
...@@ -24,6 +24,4 @@ ...@@ -24,6 +24,4 @@
You can manage permission levels for individual group members in the Members tab. You can manage permission levels for individual group members in the Members tab.
.form-actions .form-actions
= f.submit 'Add Synchronization', class: "btn btn-create" = f.submit 'Add Synchronization', class: "btn btn-create"
\ No newline at end of file
= render partial: 'ldap_group_links/ldap_group_links', locals: { group: group }
\ No newline at end of file
...@@ -167,7 +167,7 @@ Gitlab::Application.routes.draw do ...@@ -167,7 +167,7 @@ Gitlab::Application.routes.draw do
resources :users_groups, only: [:create, :update, :destroy] resources :users_groups, only: [:create, :update, :destroy]
scope module: :groups do scope module: :groups do
resources :ldap_group_links, only: [:create, :destroy] resources :ldap_group_links, only: [:index, :create, :destroy]
resource :avatar, only: [:destroy] resource :avatar, only: [:destroy]
resources :milestones resources :milestones
end 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