Commit 52e62f71 authored by Rémy Coutable's avatar Rémy Coutable

Reduce CE/EE diff in app/views/admin/groups/

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 6c5c3833
......@@ -141,13 +141,14 @@ class Group < Namespace
)
end
def add_user(user, access_level, current_user: nil, expires_at: nil)
def add_user(user, access_level, current_user: nil, expires_at: nil, ldap: false)
GroupMember.add_user(
self,
user,
access_level,
current_user: current_user,
expires_at: expires_at
expires_at: expires_at,
ldap: ldap
)
end
......@@ -195,6 +196,10 @@ class Group < Namespace
owners.include?(user) && owners.size == 1
end
def ldap_synced?
false
end
def post_create_hook
Gitlab::AppLogger.info("Group \"#{name}\" was created")
......
......@@ -2,6 +2,9 @@
= form_errors(@group)
= render 'shared/group_form', f: f
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group
= render_if_exists 'admin/namespace_plan', f: f
.form-group.row.group-description-holder
= f.label :avatar, "Group avatar", class: 'col-form-label col-sm-2'
.col-sm-10
......@@ -15,6 +18,8 @@
= render 'groups/group_admin_settings', f: f
= render_if_exists 'namespaces/shared_runners_minutes_settings', group: @group, form: f
- if @group.new_record?
.form-group.row
.offset-sm-2.col-sm-10
......@@ -28,3 +33,5 @@
.form-actions
= f.submit 'Save changes', class: "btn btn-save"
= link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel"
= render_if_exists 'ldap_group_links/ldap_syncrhonizations', group: @group
- group = local_assigns.fetch(:group)
- css_class = 'no-description' if group.description.blank?
%li.group-row{ class: css_class }
......@@ -8,6 +9,8 @@
%span.badge.badge-pill
= storage_counter(group.storage_size)
= render_if_exists 'admin/namespace_plan_badge', namespace: group
%span
= icon('bookmark')
= number_with_delimiter(group.projects.count)
......
......@@ -40,6 +40,8 @@
%strong
= @group.created_at.to_s(:medium)
= render_if_exists 'admin/namespace_plan_info', namespace: @group
%li
%span.light Storage:
%strong= storage_counter(@group.storage_size)
......@@ -58,6 +60,10 @@
= group_lfs_status(@group)
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
= render_if_exists 'namespaces/shared_runner_status', namespace: @group
= render_if_exists 'ldap_group_links/ldap_group_links_show', group: @group
.card
.card-header
%h3.card-title
......@@ -104,7 +110,7 @@
= form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do
%div
= users_select_tag(:user_ids, multiple: true, email_user: true, scope: :all)
= users_select_tag(:user_ids, multiple: true, email_user: true, skip_ldap: @group.ldap_synced?, scope: :all)
.prepend-top-10
= select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2"
%hr
......
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