Commit 863e372f authored by Sean McGivern's avatar Sean McGivern

Merge branch '6216-extract-ee-specific-files-lines-for-app-views-admin-groups' into 'master'

[CE] Resolve "Extract EE specific files/lines for app/views/admin/groups"

Closes gitlab-ee#6216

See merge request gitlab-org/gitlab-ce!19275
parents df326d06 52e62f71
...@@ -141,13 +141,14 @@ class Group < Namespace ...@@ -141,13 +141,14 @@ class Group < Namespace
) )
end 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( GroupMember.add_user(
self, self,
user, user,
access_level, access_level,
current_user: current_user, current_user: current_user,
expires_at: expires_at expires_at: expires_at,
ldap: ldap
) )
end end
...@@ -195,6 +196,10 @@ class Group < Namespace ...@@ -195,6 +196,10 @@ class Group < Namespace
owners.include?(user) && owners.size == 1 owners.include?(user) && owners.size == 1
end end
def ldap_synced?
false
end
def post_create_hook def post_create_hook
Gitlab::AppLogger.info("Group \"#{name}\" was created") Gitlab::AppLogger.info("Group \"#{name}\" was created")
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
= form_errors(@group) = form_errors(@group)
= render 'shared/group_form', f: f = 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 .form-group.row.group-description-holder
= f.label :avatar, "Group avatar", class: 'col-form-label col-sm-2' = f.label :avatar, "Group avatar", class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
...@@ -15,6 +18,8 @@ ...@@ -15,6 +18,8 @@
= render 'groups/group_admin_settings', f: f = render 'groups/group_admin_settings', f: f
= render_if_exists 'namespaces/shared_runners_minutes_settings', group: @group, form: f
- if @group.new_record? - if @group.new_record?
.form-group.row .form-group.row
.offset-sm-2.col-sm-10 .offset-sm-2.col-sm-10
...@@ -28,3 +33,5 @@ ...@@ -28,3 +33,5 @@
.form-actions .form-actions
= f.submit 'Save changes', class: "btn btn-save" = f.submit 'Save changes', class: "btn btn-save"
= link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel" = 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? - css_class = 'no-description' if group.description.blank?
%li.group-row{ class: css_class } %li.group-row{ class: css_class }
...@@ -8,6 +9,8 @@ ...@@ -8,6 +9,8 @@
%span.badge.badge-pill %span.badge.badge-pill
= storage_counter(group.storage_size) = storage_counter(group.storage_size)
= render_if_exists 'admin/namespace_plan_badge', namespace: group
%span %span
= icon('bookmark') = icon('bookmark')
= number_with_delimiter(group.projects.count) = number_with_delimiter(group.projects.count)
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
%strong %strong
= @group.created_at.to_s(:medium) = @group.created_at.to_s(:medium)
= render_if_exists 'admin/namespace_plan_info', namespace: @group
%li %li
%span.light Storage: %span.light Storage:
%strong= storage_counter(@group.storage_size) %strong= storage_counter(@group.storage_size)
...@@ -58,6 +60,10 @@ ...@@ -58,6 +60,10 @@
= group_lfs_status(@group) = group_lfs_status(@group)
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') = 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
.card-header .card-header
%h3.card-title %h3.card-title
...@@ -104,7 +110,7 @@ ...@@ -104,7 +110,7 @@
= form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put do
%div %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 .prepend-top-10
= select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2" = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2"
%hr %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