Commit 746643e1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'feature-120-multiple-ldap-groups' into 'master'

Feature 120 multiple ldap groups

Fixes issue found in QA tests

- #158 inconsistent success behaviour for admin#ldap
- #157 Wrong navigation bar in group/ldapgrouplinks

See merge request !164
parents 1a0c9119 6a3c694a
...@@ -2,13 +2,19 @@ class Groups::LdapGroupLinksController < ApplicationController ...@@ -2,13 +2,19 @@ class Groups::LdapGroupLinksController < ApplicationController
before_action :group before_action :group
before_action :authorize_admin_group! before_action :authorize_admin_group!
layout 'group'
def index def index
end 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
redirect_to :back, notice: 'New LDAP link saved' if request.referer && request.referer.include?('admin')
redirect_to [:admin, @group], notice: 'New LDAP link saved'
else
redirect_to :back, notice: 'New LDAP link saved'
end
else else
redirect_to :back, alert: 'Could not create new LDAP link' redirect_to :back, alert: 'Could not create new LDAP link'
end end
......
...@@ -8,4 +8,5 @@ ...@@ -8,4 +8,5 @@
%ul.well-list %ul.well-list
= render collection: group.ldap_group_links, partial: 'ldap_group_links/ldap_group_link', locals: { group: group } = render collection: group.ldap_group_links, partial: 'ldap_group_links/ldap_group_link', locals: { group: group }
- else - else
%p No linked LDAP groups .panel-body
No linked LDAP groups
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