diff options
| -rw-r--r-- | app/assets/stylesheets/sections/header.scss | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | app/views/dashboard/issues.html.haml | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | app/views/dashboard/merge_requests.html.haml | 2 | ||||
| -rw-r--r-- | doc/raketasks/user_management.md | 16 | ||||
| -rw-r--r-- | lib/tasks/gitlab/bulk_add_permission.rake | 24 |
5 files changed, 44 insertions, 4 deletions
diff --git a/app/assets/stylesheets/sections/header.scss b/app/assets/stylesheets/sections/header.scss index f268f2a9845..c8091c84891 100644 --- a/app/assets/stylesheets/sections/header.scss +++ b/app/assets/stylesheets/sections/header.scss @@ -108,7 +108,7 @@ header { h1 { margin: 0; - background: url('logo-black.png') no-repeat center center; + background: image-url('logo-black.png') no-repeat center center; background-size: 32px; float: left; height: 46px; @@ -220,7 +220,7 @@ header { .app_logo { a { h1 { - background: url('logo-white.png') no-repeat center center; + background: image-url('logo-white.png') no-repeat center center; background-size: 32px; color: #fff; text-shadow: 0 1px 1px #444; diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index 19bd4e7bd54..af627588ad9 100644..100755 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -3,7 +3,7 @@ %span.pull-right #{@issues.total_count} issues %p.light - List all issues from all project's you have access to. + List all issues from all projects you have access to. %hr .row diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index b487a4d6666..550a93e178c 100644..100755 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -4,7 +4,7 @@ %p.light - List all merge requests from all project's you have access to. + List all merge requests from all projects you have access to. %hr .row .col-md-3 diff --git a/doc/raketasks/user_management.md b/doc/raketasks/user_management.md index 9884c9c0fe3..38474104852 100644 --- a/doc/raketasks/user_management.md +++ b/doc/raketasks/user_management.md @@ -14,3 +14,19 @@ Notes: ```bash bundle exec rake gitlab:import:all_users_to_all_projects ``` + +### Add user as a developer to all projects + +``` +bundle exec rake gitlab:import:user_to_groups[username@domain.tld] +``` + +### Add all users to all groups + +Notes: + +* admin users are added as owners so they can add additional users to the group + +``` +bundle exec rake gitlab:import:all_users_to_all_groups +``` diff --git a/lib/tasks/gitlab/bulk_add_permission.rake b/lib/tasks/gitlab/bulk_add_permission.rake index 612a9ba93a8..0e1a3d071e9 100644 --- a/lib/tasks/gitlab/bulk_add_permission.rake +++ b/lib/tasks/gitlab/bulk_add_permission.rake @@ -20,5 +20,29 @@ namespace :gitlab do puts "Importing #{user.email} users into #{project_ids.size} projects" UsersProject.add_users_into_projects(project_ids, Array.wrap(user.id), UsersProject::DEVELOPER) end + + desc "GITLAB | Add all users to all groups (admin users are added as owners)" + task all_users_to_all_groups: :environment do |t, args| + user_ids = User.where(admin: false).pluck(:id) + admin_ids = User.where(admin: true).pluck(:id) + groups = Group.all + + puts "Importing #{user_ids.size} users into #{groups.size} groups" + puts "Importing #{admin_ids.size} admins into #{groups.size} groups" + groups.each do |group| + group.add_users(user_ids, UsersGroup::DEVELOPER) + group.add_users(admin_ids, UsersGroup::OWNER) + end + end + + desc "GITLAB | Add a specific user to all groups (as a developer)" + task :user_to_groups, [:email] => :environment do |t, args| + user = User.find_by_email args.email + groups = Group.all + puts "Importing #{user.email} users into #{groups.size} groups" + groups.each do |group| + group.add_users(Array.wrap(user.id), UsersGroup::DEVELOPER) + end + end end end |
