Commit ed4f5b97 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge remote-tracking branch 'upstream/master' into 35642-add-owner-to-triggers-factory

* upstream/master: (49 commits)
  Fire system hooks when a user is created via LDAP or OAuth
  Common Docker Documentation Location in `gitlab-ce`
  fix deprecation warning present during webpack compiles
  Enable 5 lines of Sidekiq backtrace lines to aid in debugging
  Add support for copying permalink to notes via more actions dropdown
  Docs: update - fix headers
  Handle creating a nested group on MySQL correctly
  Decrease statuses batch size even more in a migration
  Fix failure when issue author is nil
  Fix searching for files by path
  Fix invite by email address duplication
  Revert "Merge branch 'mk-reenable-mysql-tests-on-all-branches' into 'master'"
  Fix repo editor scrollbar
  Revert "Merge branch 'sh-sidekiq-backtrace' into 'master'"
  Replace 'source/search_code.feature' spinach test with an rspec analog
  Add missing third argument to `Git::Repository#initialize` in spec
  New doc: how to install GitLab on Azure
  Authorizations regarding OAuth - style confirmation
  Enable 5 lines of Sidekiq backtrace lines to aid in debugging
  Reenable MySQL tests on all branches
  ...
parents 45aa23a6 ef8eb3f6
...@@ -207,9 +207,6 @@ gem 'kubeclient', '~> 2.2.0' ...@@ -207,9 +207,6 @@ gem 'kubeclient', '~> 2.2.0'
# d3 # d3
gem 'd3_rails', '~> 3.5.0' gem 'd3_rails', '~> 3.5.0'
# underscore-rails
gem 'underscore-rails', '~> 1.8.0'
# Sanitize user input # Sanitize user input
gem 'sanitize', '~> 2.0' gem 'sanitize', '~> 2.0'
gem 'babosa', '~> 1.0.2' gem 'babosa', '~> 1.0.2'
...@@ -401,7 +398,7 @@ group :ed25519 do ...@@ -401,7 +398,7 @@ group :ed25519 do
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly', '~> 0.30.0' gem 'gitaly-proto', '~> 0.31.0', require: 'gitaly'
gem 'toml-rb', '~> 0.3.15', require: false gem 'toml-rb', '~> 0.3.15', require: false
......
...@@ -275,7 +275,7 @@ GEM ...@@ -275,7 +275,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gherkin-ruby (0.3.2) gherkin-ruby (0.3.2)
gitaly (0.30.0) gitaly-proto (0.31.0)
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
grpc (~> 1.0) grpc (~> 1.0)
github-linguist (4.7.6) github-linguist (4.7.6)
...@@ -899,7 +899,6 @@ GEM ...@@ -899,7 +899,6 @@ GEM
uglifier (2.7.2) uglifier (2.7.2)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
underscore-rails (1.8.3)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
...@@ -1019,7 +1018,7 @@ DEPENDENCIES ...@@ -1019,7 +1018,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0) gettext_i18n_rails_js (~> 1.2.0)
gitaly (~> 0.30.0) gitaly-proto (~> 0.31.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.5.1) gitlab-markup (~> 1.5.1)
...@@ -1163,7 +1162,6 @@ DEPENDENCIES ...@@ -1163,7 +1162,6 @@ DEPENDENCIES
truncato (~> 0.7.8) truncato (~> 0.7.8)
u2f (~> 0.2.1) u2f (~> 0.2.1)
uglifier (~> 2.7.2) uglifier (~> 2.7.2)
underscore-rails (~> 1.8.0)
unf (~> 0.1.4) unf (~> 0.1.4)
unicorn (~> 5.1.0) unicorn (~> 5.1.0)
unicorn-worker-killer (~> 0.4.4) unicorn-worker-killer (~> 0.4.4)
......
...@@ -55,13 +55,18 @@ const Api = { ...@@ -55,13 +55,18 @@ const Api = {
// Return projects list. Filtered by query // Return projects list. Filtered by query
projects(query, options, callback) { projects(query, options, callback) {
const url = Api.buildUrl(Api.projectsPath); const url = Api.buildUrl(Api.projectsPath);
const defaults = {
search: query,
per_page: 20,
};
if (gon.current_user_id) {
defaults.membership = true;
}
return $.ajax({ return $.ajax({
url, url,
data: Object.assign({ data: Object.assign(defaults, options),
search: query,
per_page: 20,
membership: true,
}, options),
dataType: 'json', dataType: 'json',
}) })
.done(projects => callback(projects)); .done(projects => callback(projects));
......
...@@ -29,12 +29,14 @@ showTooltip = function(target, title) { ...@@ -29,12 +29,14 @@ showTooltip = function(target, title) {
var $target = $(target); var $target = $(target);
var originalTitle = $target.data('original-title'); var originalTitle = $target.data('original-title');
$target if (!$target.data('hideTooltip')) {
.attr('title', 'Copied') $target
.tooltip('fixTitle') .attr('title', 'Copied')
.tooltip('show') .tooltip('fixTitle')
.attr('title', originalTitle) .tooltip('show')
.tooltip('fixTitle'); .attr('title', originalTitle)
.tooltip('fixTitle');
}
}; };
$(function() { $(function() {
......
...@@ -588,9 +588,10 @@ function UsersSelect(currentUser, els) { ...@@ -588,9 +588,10 @@ function UsersSelect(currentUser, els) {
if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) { if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) {
var trimmed = query.term.trim(); var trimmed = query.term.trim();
emailUser = { emailUser = {
name: "Invite \"" + query.term + "\"", name: "Invite \"" + query.term + "\" by email",
username: trimmed, username: trimmed,
id: trimmed id: trimmed,
invite: true
}; };
data.results.unshift(emailUser); data.results.unshift(emailUser);
} }
...@@ -642,7 +643,7 @@ UsersSelect.prototype.formatResult = function(user) { ...@@ -642,7 +643,7 @@ UsersSelect.prototype.formatResult = function(user) {
} else { } else {
avatar = gon.default_avatar_url; avatar = gon.default_avatar_url;
} }
return "<div class='user-result " + (!user.username ? 'no-username' : void 0) + "'> <div class='user-image'><img class='avatar avatar-inline s32' src='" + avatar + "'></div> <div class='user-name dropdown-menu-user-full-name'>" + user.name + "</div> <div class='user-username dropdown-menu-user-username'>" + ("@" + user.username || "") + "</div> </div>"; return "<div class='user-result " + (!user.username ? 'no-username' : void 0) + "'> <div class='user-image'><img class='avatar avatar-inline s32' src='" + avatar + "'></div> <div class='user-name dropdown-menu-user-full-name'>" + user.name + "</div> <div class='user-username dropdown-menu-user-username'>" + (!user.invite ? "@" + _.escape(user.username) : "") + "</div> </div>";
}; };
UsersSelect.prototype.formatSelection = function(user) { UsersSelect.prototype.formatSelection = function(user) {
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
&.s60 { font-size: 32px; line-height: 58px; } &.s60 { font-size: 32px; line-height: 58px; }
&.s70 { font-size: 34px; line-height: 70px; } &.s70 { font-size: 34px; line-height: 70px; }
&.s90 { font-size: 36px; line-height: 88px; } &.s90 { font-size: 36px; line-height: 88px; }
&.s110 { font-size: 40px; line-height: 108px; font-weight: 300; } &.s110 { font-size: 40px; line-height: 108px; font-weight: $gl-font-weight-normal; }
&.s140 { font-size: 72px; line-height: 138px; } &.s140 { font-size: 72px; line-height: 138px; }
&.s160 { font-size: 96px; line-height: 158px; } &.s160 { font-size: 96px; line-height: 158px; }
} }
......
.badge { .badge {
font-weight: normal; font-weight: $gl-font-weight-normal;
background-color: $badge-bg; background-color: $badge-bg;
color: $badge-color; color: $badge-color;
vertical-align: baseline; vertical-align: baseline;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
text-align: center; text-align: center;
padding: 20px; padding: 20px;
color: $gl-text-color; color: $gl-text-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-size: 14px; font-size: 14px;
line-height: 36px; line-height: 36px;
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
h1 { h1 {
display: inline; display: inline;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-size: 24px; font-size: 24px;
color: $gl-text-color; color: $gl-text-color;
} }
......
@mixin btn-default { @mixin btn-default {
border-radius: 3px; border-radius: 3px;
font-size: $gl-font-size; font-size: $gl-font-size;
font-weight: 400; font-weight: $gl-font-weight-normal;
padding: $gl-vert-padding $gl-btn-padding; padding: $gl-vert-padding $gl-btn-padding;
&:focus, &:focus,
......
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
.pika-label { .pika-label {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
th { th {
padding: 2px 0; padding: 2px 0;
color: $note-disabled-comment-color; color: $note-disabled-comment-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
text-transform: lowercase; text-transform: lowercase;
border-top: 1px solid $calendar-border-color; border-top: 1px solid $calendar-border-color;
} }
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
.is-today { .is-today {
.pika-day { .pika-day {
color: inherit; color: inherit;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
color: $common-gray; color: $common-gray;
font-size: 14px; font-size: 14px;
margin-bottom: 12px; margin-bottom: 12px;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 24px; line-height: 24px;
} }
.bold { .bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.tab-content { .tab-content {
...@@ -89,7 +89,7 @@ hr { ...@@ -89,7 +89,7 @@ hr {
} }
} }
.item-title { font-weight: 600; } .item-title { font-weight: $gl-font-weight-bold; }
/** FLASH message **/ /** FLASH message **/
.author_link, .author_link,
...@@ -118,18 +118,18 @@ table a code { ...@@ -118,18 +118,18 @@ table a code {
span.update-author { span.update-author {
display: block; display: block;
color: $update-author-color; color: $update-author-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: italic; font-style: italic;
strong { strong {
font-weight: bold; font-weight: $gl-font-weight-bold;
font-style: normal; font-style: normal;
} }
} }
.user-mention { .user-mention {
color: $user-mention-color; color: $user-mention-color;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.field_with_errors { .field_with_errors {
...@@ -222,7 +222,7 @@ li.note { ...@@ -222,7 +222,7 @@ li.note {
text-align: center; text-align: center;
background: $error-bg; background: $error-bg;
color: $white-light; color: $white-light;
font-weight: bold; font-weight: $gl-font-weight-bold;
a { a {
color: $white-light; color: $white-light;
...@@ -339,7 +339,7 @@ table { ...@@ -339,7 +339,7 @@ table {
.header-with-avatar { .header-with-avatar {
h3 { h3 {
margin: 0; margin: 0;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.username { .username {
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
margin-top: 2px; margin-top: 2px;
margin-bottom: 0; margin-bottom: 0;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: $gl-font-weight-normal;
padding: 8px 0; padding: 8px 0;
background-color: $white-light; background-color: $white-light;
border: 1px solid $dropdown-border-color; border: 1px solid $dropdown-border-color;
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
} }
.dropdown-bold-header { .dropdown-bold-header {
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 22px; line-height: 22px;
padding: 0 16px; padding: 0 16px;
} }
...@@ -432,7 +432,7 @@ ...@@ -432,7 +432,7 @@
.dropdown-menu-user-full-name { .dropdown-menu-user-full-name {
display: block; display: block;
font-weight: 500; font-weight: $gl-font-weight-normal;
line-height: 16px; line-height: 16px;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
...@@ -468,7 +468,7 @@ ...@@ -468,7 +468,7 @@
&.is-indeterminate, &.is-indeterminate,
&.is-active { &.is-active {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
&::before { &::before {
...@@ -502,7 +502,7 @@ ...@@ -502,7 +502,7 @@
position: relative; position: relative;
padding: 2px 25px 10px; padding: 2px 25px 10px;
margin: 0 10px 10px; margin: 0 10px 10px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 1; line-height: 1;
text-align: center; text-align: center;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -685,7 +685,7 @@ ...@@ -685,7 +685,7 @@
.dropdown-menu-inner-title { .dropdown-menu-inner-title {
display: block; display: block;
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.dropdown-menu-inner-content { .dropdown-menu-inner-content {
......
...@@ -371,7 +371,7 @@ ...@@ -371,7 +371,7 @@
} }
> .value { > .value {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -452,7 +452,7 @@ ...@@ -452,7 +452,7 @@
.dropdown-light-content { .dropdown-light-content {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: $gl-font-weight-normal;
} }
.dropdown-user { .dropdown-user {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
a.flash-action { a.flash-action {
margin-left: 5px; margin-left: 5px;
text-decoration: none; text-decoration: none;
font-weight: normal; font-weight: $gl-font-weight-normal;
border-bottom: 1px solid; border-bottom: 1px solid;
&:hover { &:hover {
......
...@@ -32,7 +32,7 @@ label { ...@@ -32,7 +32,7 @@ label {
} }
&.label-light { &.label-light {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -73,7 +73,7 @@ label { ...@@ -73,7 +73,7 @@ label {
margin-right: 0; margin-right: 0;
.control-label { .control-label {
font-weight: bold; font-weight: $gl-font-weight-bold;
padding-top: 4px; padding-top: 4px;
} }
...@@ -157,7 +157,7 @@ label { ...@@ -157,7 +157,7 @@ label {
.form-group .control-label, .form-group .control-label,
.form-group .control-label-full-width { .form-group .control-label-full-width {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.form-control::-webkit-input-placeholder { .form-control::-webkit-input-placeholder {
......
...@@ -160,7 +160,7 @@ header { ...@@ -160,7 +160,7 @@ header {
li { li {
&.active a { &.active a {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
} }
...@@ -250,7 +250,7 @@ header { ...@@ -250,7 +250,7 @@ header {
font-size: 18px; font-size: 18px;
line-height: 22px; line-height: 22px;
display: inline-block; display: inline-block;
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color; color: $gl-text-color;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
...@@ -326,7 +326,7 @@ header { ...@@ -326,7 +326,7 @@ header {
.badge { .badge {
position: inherit; position: inherit;
top: -8px; top: -8px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin-left: -11px; margin-left: -11px;
font-size: 11px; font-size: 11px;
color: $white-light; color: $white-light;
......
...@@ -113,7 +113,7 @@ ul.content-list { ...@@ -113,7 +113,7 @@ ul.content-list {
} }
.title { .title {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
a { a {
...@@ -212,7 +212,7 @@ ul.content-list { ...@@ -212,7 +212,7 @@ ul.content-list {
} }
.row-title { .row-title {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.row-second-line { .row-second-line {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
background: $gray-light; background: $gray-light;
a { a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
} }
.text-danger { .text-danger {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -16,6 +16,14 @@ body.modal-open { ...@@ -16,6 +16,14 @@ body.modal-open {
overflow: hidden; overflow: hidden;
} }
.modal-no-backdrop {
@extend .modal-dialog;
.modal-content {
box-shadow: none;
}
}
@media (min-width: $screen-md-min) { @media (min-width: $screen-md-min) {
.modal-dialog { .modal-dialog {
width: 860px; width: 860px;
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
&.active a { &.active a {
border-bottom: 2px solid $link-underline-blue; border-bottom: 2px solid $link-underline-blue;
color: $black; color: $black;
font-weight: 600; font-weight: $gl-font-weight-bold;
.badge { .badge {
color: $black; color: $black;
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
z-index: 300; z-index: 300;
li.active { li.active {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
} }
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
.commit-committer-link, .commit-committer-link,
.commit-author-link { .commit-author-link {
color: $gl-text-color; color: $gl-text-color;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.commit-info { .commit-info {
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
} }
.select2-results li.select2-result-with-children > .select2-result-label { .select2-results li.select2-result-with-children > .select2-result-label {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
} }
...@@ -227,7 +227,7 @@ ...@@ -227,7 +227,7 @@
} }
.group-name { .group-name {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.group-path { .group-path {
...@@ -252,12 +252,12 @@ ...@@ -252,12 +252,12 @@
.namespace-result { .namespace-result {
.namespace-kind { .namespace-kind {
color: $namespace-kind-color; color: $namespace-kind-color;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.namespace-path { .namespace-path {
margin-left: 10px; margin-left: 10px;
font-weight: bolder; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
padding: 0 1px; padding: 0 1px;
.select2-match { .select2-match {
font-weight: bold; font-weight: $gl-font-weight-bold;
text-decoration: none; text-decoration: none;
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
.snippet-title { .snippet-title {
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.snippet-edited-ago { .snippet-edited-ago {
......
...@@ -32,7 +32,7 @@ table { ...@@ -32,7 +32,7 @@ table {
th { th {
background-color: $gray-light; background-color: $gray-light;
font-weight: normal; font-weight: $gl-font-weight-normal;
border-bottom: none; border-bottom: none;
&.wide { &.wide {
......
...@@ -103,7 +103,7 @@ summary { ...@@ -103,7 +103,7 @@ summary {
padding: 4px 5px; padding: 4px 5px;
font-size: 12px; font-size: 12px;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: $gl-font-weight-normal;
display: inline-block; display: inline-block;
&.label-gray { &.label-gray {
...@@ -165,7 +165,7 @@ summary { ...@@ -165,7 +165,7 @@ summary {
.panel-heading { .panel-heading {
padding: 6px 15px; padding: 6px 15px;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: $gl-font-weight-normal;
a { a {
color: $panel-heading-link-color; color: $panel-heading-link-color;
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
h1 { h1 {
font-size: 1.75em; font-size: 1.75em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 24px 0 16px; margin: 24px 0 16px;
padding-bottom: 0.3em; padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark; border-bottom: 1px solid $white-dark;
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
h2 { h2 {
font-size: 1.5em; font-size: 1.5em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 24px 0 16px; margin: 24px 0 16px;
padding-bottom: 0.3em; padding-bottom: 0.3em;
border-bottom: 1px solid $white-dark; border-bottom: 1px solid $white-dark;
...@@ -280,7 +280,7 @@ body { ...@@ -280,7 +280,7 @@ body {
margin-top: $gl-padding; margin-top: $gl-padding;
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: $gl-font-weight-bold;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
...@@ -291,7 +291,7 @@ body { ...@@ -291,7 +291,7 @@ body {
margin-top: 0; margin-top: 0;
line-height: 1.3; line-height: 1.3;
font-size: 1.25em; font-size: 1.25em;
font-weight: 600; font-weight: $gl-font-weight-bold;
margin: 12px 7px; margin: 12px 7px;
} }
...@@ -302,11 +302,11 @@ h4, ...@@ -302,11 +302,11 @@ h4,
h5, h5,
h6 { h6 {
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.light-header { .light-header {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
/** CODE **/ /** CODE **/
......
...@@ -111,6 +111,8 @@ $well-light-text-color: #5b6169; ...@@ -111,6 +111,8 @@ $well-light-text-color: #5b6169;
* Text * Text
*/ */
$gl-font-size: 14px; $gl-font-size: 14px;
$gl-font-weight-normal: 400;
$gl-font-weight-bold: 600;
$gl-text-color: #2e2e2e; $gl-text-color: #2e2e2e;
$gl-text-color-secondary: #707070; $gl-text-color-secondary: #707070;
$gl-text-color-tertiary: #949494; $gl-text-color-tertiary: #949494;
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
.well-centered { .well-centered {
h1 { h1 {
font-weight: normal; font-weight: $gl-font-weight-normal;
text-align: center; text-align: center;
font-size: 48px; font-size: 48px;
} }
......
...@@ -204,11 +204,11 @@ $dark-il: #de935f; ...@@ -204,11 +204,11 @@ $dark-il: #de935f;
.cs { color: $dark-cs; } /* Comment.Special */ .cs { color: $dark-cs; } /* Comment.Special */
.gd { color: $dark-gd; } /* Generic.Deleted */ .gd { color: $dark-gd; } /* Generic.Deleted */
.ge { font-style: italic; } /* Generic.Emph */ .ge { font-style: italic; } /* Generic.Emph */
.gh { color: $dark-gh; font-weight: bold; } /* Generic.Heading */ .gh { color: $dark-gh; font-weight: $gl-font-weight-bold; } /* Generic.Heading */
.gi { color: $dark-gi; } /* Generic.Inserted */ .gi { color: $dark-gi; } /* Generic.Inserted */
.gp { color: $dark-gp; font-weight: bold; } /* Generic.Prompt */ .gp { color: $dark-gp; font-weight: $gl-font-weight-bold; } /* Generic.Prompt */
.gs { font-weight: bold; } /* Generic.Strong */ .gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $dark-gu; font-weight: bold; } /* Generic.Subheading */ .gu { color: $dark-gu; font-weight: $gl-font-weight-bold; } /* Generic.Subheading */
.kc { color: $dark-kc; } /* Keyword.Constant */ .kc { color: $dark-kc; } /* Keyword.Constant */
.kd { color: $dark-kd; } /* Keyword.Declaration */ .kd { color: $dark-kd; } /* Keyword.Declaration */
.kn { color: $dark-kn; } /* Keyword.Namespace */ .kn { color: $dark-kn; } /* Keyword.Namespace */
......
...@@ -203,7 +203,7 @@ $monokai-gi: #a6e22e; ...@@ -203,7 +203,7 @@ $monokai-gi: #a6e22e;
.c1 { color: $monokai-c1; } /* Comment.Single */ .c1 { color: $monokai-c1; } /* Comment.Single */
.cs { color: $monokai-cs; } /* Comment.Special */ .cs { color: $monokai-cs; } /* Comment.Special */
.ge { font-style: italic; } /* Generic.Emph */ .ge { font-style: italic; } /* Generic.Emph */
.gs { font-weight: bold; } /* Generic.Strong */ .gs { font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.kc { color: $monokai-kc; } /* Keyword.Constant */ .kc { color: $monokai-kc; } /* Keyword.Constant */
.kd { color: $monokai-kd; } /* Keyword.Declaration */ .kd { color: $monokai-kd; } /* Keyword.Declaration */
.kn { color: $monokai-kn; } /* Keyword.Namespace */ .kn { color: $monokai-kn; } /* Keyword.Namespace */
......
...@@ -231,7 +231,7 @@ $solarized-dark-il: #2aa198; ...@@ -231,7 +231,7 @@ $solarized-dark-il: #2aa198;
.gi { color: $solarized-dark-gi; } /* Generic.Inserted */ .gi { color: $solarized-dark-gi; } /* Generic.Inserted */
.go { color: $solarized-dark-go; } /* Generic.Output */ .go { color: $solarized-dark-go; } /* Generic.Output */
.gp { color: $solarized-dark-gp; } /* Generic.Prompt */ .gp { color: $solarized-dark-gp; } /* Generic.Prompt */
.gs { color: $solarized-dark-gs; font-weight: bold; } /* Generic.Strong */ .gs { color: $solarized-dark-gs; font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $solarized-dark-gu; } /* Generic.Subheading */ .gu { color: $solarized-dark-gu; } /* Generic.Subheading */
.gt { color: $solarized-dark-gt; } /* Generic.Traceback */ .gt { color: $solarized-dark-gt; } /* Generic.Traceback */
.kc { color: $solarized-dark-kc; } /* Keyword.Constant */ .kc { color: $solarized-dark-kc; } /* Keyword.Constant */
......
...@@ -239,7 +239,7 @@ $solarized-light-il: #2aa198; ...@@ -239,7 +239,7 @@ $solarized-light-il: #2aa198;
.gi { color: $solarized-light-gi; } /* Generic.Inserted */ .gi { color: $solarized-light-gi; } /* Generic.Inserted */
.go { color: $solarized-light-go; } /* Generic.Output */ .go { color: $solarized-light-go; } /* Generic.Output */
.gp { color: $solarized-light-gp; } /* Generic.Prompt */ .gp { color: $solarized-light-gp; } /* Generic.Prompt */
.gs { color: $solarized-light-gs; font-weight: bold; } /* Generic.Strong */ .gs { color: $solarized-light-gs; font-weight: $gl-font-weight-bold; } /* Generic.Strong */
.gu { color: $solarized-light-gu; } /* Generic.Subheading */ .gu { color: $solarized-light-gu; } /* Generic.Subheading */
.gt { color: $solarized-light-gt; } /* Generic.Traceback */ .gt { color: $solarized-light-gt; } /* Generic.Traceback */
.kc { color: $solarized-light-kc; } /* Keyword.Constant */ .kc { color: $solarized-light-kc; } /* Keyword.Constant */
......
...@@ -211,12 +211,12 @@ $white-gc-bg: #eaf2f5; ...@@ -211,12 +211,12 @@ $white-gc-bg: #eaf2f5;
.hll { background-color: $white-hll-bg; } .hll { background-color: $white-hll-bg; }
.c { color: $white-c; font-style: italic; } .c { color: $white-c; font-style: italic; }
.err { color: $white-err; background-color: $white-err-bg; } .err { color: $white-err; background-color: $white-err-bg; }
.k { font-weight: bold; } .k { font-weight: $gl-font-weight-bold; }
.o { font-weight: bold; } .o { font-weight: $gl-font-weight-bold; }
.cm { color: $white-cm; font-style: italic; } .cm { color: $white-cm; font-style: italic; }
.cp { color: $white-cp; font-weight: bold; } .cp { color: $white-cp; font-weight: $gl-font-weight-bold; }
.c1 { color: $white-c1; font-style: italic; } .c1 { color: $white-c1; font-style: italic; }
.cs { color: $white-cs; font-weight: bold; font-style: italic; } .cs { color: $white-cs; font-weight: $gl-font-weight-bold; font-style: italic; }
.gd { color: $white-gd; background-color: $white-gd-bg; } .gd { color: $white-gd; background-color: $white-gd-bg; }
.gd .x { color: $white-gd-x; background-color: $white-gd-x-bg; } .gd .x { color: $white-gd-x; background-color: $white-gd-x-bg; }
.ge { font-style: italic; } .ge { font-style: italic; }
...@@ -226,29 +226,29 @@ $white-gc-bg: #eaf2f5; ...@@ -226,29 +226,29 @@ $white-gc-bg: #eaf2f5;
.gi .x { color: $white-gi-x; background-color: $white-gi-x-bg; } .gi .x { color: $white-gi-x; background-color: $white-gi-x-bg; }
.go { color: $white-go; } .go { color: $white-go; }
.gp { color: $white-gp; } .gp { color: $white-gp; }
.gs { font-weight: bold; } .gs { font-weight: $gl-font-weight-bold; }
.gu { color: $white-gu; font-weight: bold; } .gu { color: $white-gu; font-weight: $gl-font-weight-bold; }
.gt { color: $white-gt; } .gt { color: $white-gt; }
.kc { font-weight: bold; } .kc { font-weight: $gl-font-weight-bold; }
.kd { font-weight: bold; } .kd { font-weight: $gl-font-weight-bold; }
.kn { font-weight: bold; } .kn { font-weight: $gl-font-weight-bold; }
.kp { font-weight: bold; } .kp { font-weight: $gl-font-weight-bold; }
.kr { font-weight: bold; } .kr { font-weight: $gl-font-weight-bold; }
.kt { color: $white-kt; font-weight: bold; } .kt { color: $white-kt; font-weight: $gl-font-weight-bold; }
.m { color: $white-m; } .m { color: $white-m; }
.s { color: $white-s; } .s { color: $white-s; }
.n { color: $white-n; } .n { color: $white-n; }
.na { color: $white-na; } .na { color: $white-na; }
.nb { color: $white-nb; } .nb { color: $white-nb; }
.nc { color: $white-nc; font-weight: bold; } .nc { color: $white-nc; font-weight: $gl-font-weight-bold; }
.no { color: $white-no; } .no { color: $white-no; }
.ni { color: $white-ni; } .ni { color: $white-ni; }
.ne { color: $white-ne; font-weight: bold; } .ne { color: $white-ne; font-weight: $gl-font-weight-bold; }
.nf { color: $white-nf; font-weight: bold; } .nf { color: $white-nf; font-weight: $gl-font-weight-bold; }
.nn { color: $white-nn; } .nn { color: $white-nn; }
.nt { color: $white-nt; } .nt { color: $white-nt; }
.nv { color: $white-nv; } .nv { color: $white-nv; }
.ow { font-weight: bold; } .ow { font-weight: $gl-font-weight-bold; }
.w { color: $white-w; } .w { color: $white-w; }
.mf { color: $white-mf; } .mf { color: $white-mf; }
.mh { color: $white-mh; } .mh { color: $white-mh; }
......
...@@ -152,12 +152,12 @@ span.highlight_word { ...@@ -152,12 +152,12 @@ span.highlight_word {
.hll { background-color: $highlighted-hll-bg; } .hll { background-color: $highlighted-hll-bg; }
.c { color: $highlighted-c; font-style: italic; } .c { color: $highlighted-c; font-style: italic; }
.err { color: $highlighted-err; background-color: $highlighted-err-bg; } .err { color: $highlighted-err; background-color: $highlighted-err-bg; }
.k { font-weight: bold; } .k { font-weight: $gl-font-weight-bold; }
.o { font-weight: bold; } .o { font-weight: $gl-font-weight-bold; }
.cm { color: $highlighted-cm; font-style: italic; } .cm { color: $highlighted-cm; font-style: italic; }
.cp { color: $highlighted-cp; font-weight: bold; } .cp { color: $highlighted-cp; font-weight: $gl-font-weight-bold; }
.c1 { color: $highlighted-c1; font-style: italic; } .c1 { color: $highlighted-c1; font-style: italic; }
.cs { color: $highlighted-cs; font-weight: bold; font-style: italic; } .cs { color: $highlighted-cs; font-weight: $gl-font-weight-bold; font-style: italic; }
.gd { color: $highlighted-gd; background-color: $highlighted-gd-bg; } .gd { color: $highlighted-gd; background-color: $highlighted-gd-bg; }
.gd .x { color: $highlighted-gd; background-color: $highlighted-gd-x-bg; } .gd .x { color: $highlighted-gd; background-color: $highlighted-gd-x-bg; }
.ge { font-style: italic; } .ge { font-style: italic; }
...@@ -167,29 +167,29 @@ span.highlight_word { ...@@ -167,29 +167,29 @@ span.highlight_word {
.gi .x { color: $highlighted-gi; background-color: $highlighted-gi-x-bg; } .gi .x { color: $highlighted-gi; background-color: $highlighted-gi-x-bg; }
.go { color: $highlighted-go; } .go { color: $highlighted-go; }
.gp { color: $highlighted-gp; } .gp { color: $highlighted-gp; }
.gs { font-weight: bold; } .gs { font-weight: $gl-font-weight-bold; }
.gu { color: $highlighted-gu; font-weight: bold; } .gu { color: $highlighted-gu; font-weight: $gl-font-weight-bold; }
.gt { color: $highlighted-gt; } .gt { color: $highlighted-gt; }
.kc { font-weight: bold; } .kc { font-weight: $gl-font-weight-bold; }
.kd { font-weight: bold; } .kd { font-weight: $gl-font-weight-bold; }
.kn { font-weight: bold; } .kn { font-weight: $gl-font-weight-bold; }
.kp { font-weight: bold; } .kp { font-weight: $gl-font-weight-bold; }
.kr { font-weight: bold; } .kr { font-weight: $gl-font-weight-bold; }
.kt { color: $highlighted-kt; font-weight: bold; } .kt { color: $highlighted-kt; font-weight: $gl-font-weight-bold; }
.m { color: $highlighted-m; } .m { color: $highlighted-m; }
.s { color: $highlighted-s; } .s { color: $highlighted-s; }
.n { color: $highlighted-n; } .n { color: $highlighted-n; }
.na { color: $highlighted-na; } .na { color: $highlighted-na; }
.nb { color: $highlighted-nb; } .nb { color: $highlighted-nb; }
.nc { color: $highlighted-nc; font-weight: bold; } .nc { color: $highlighted-nc; font-weight: $gl-font-weight-bold; }
.no { color: $highlighted-no; } .no { color: $highlighted-no; }
.ni { color: $highlighted-ni; } .ni { color: $highlighted-ni; }
.ne { color: $highlighted-ne; font-weight: bold; } .ne { color: $highlighted-ne; font-weight: $gl-font-weight-bold; }
.nf { color: $highlighted-nf; font-weight: bold; } .nf { color: $highlighted-nf; font-weight: $gl-font-weight-bold; }
.nn { color: $highlighted-nn; } .nn { color: $highlighted-nn; }
.nt { color: $highlighted-nt; } .nt { color: $highlighted-nt; }
.nv { color: $highlighted-nv; } .nv { color: $highlighted-nv; }
.ow { font-weight: bold; } .ow { font-weight: $gl-font-weight-bold; }
.w { color: $highlighted-w; } .w { color: $highlighted-w; }
.mf { color: $highlighted-mf; } .mf { color: $highlighted-mf; }
.mh { color: $highlighted-mh; } .mh { color: $highlighted-mh; }
......
...@@ -134,7 +134,7 @@ header.navbar-gitlab-new { ...@@ -134,7 +134,7 @@ header.navbar-gitlab-new {
li { li {
.badge { .badge {
box-shadow: none; box-shadow: none;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
...@@ -193,7 +193,7 @@ header.navbar-gitlab-new { ...@@ -193,7 +193,7 @@ header.navbar-gitlab-new {
&.active > a { &.active > a {
box-shadow: inset 0 -3px 0 $indigo-500; box-shadow: inset 0 -3px 0 $indigo-500;
color: $white-light; color: $white-light;
font-weight: 700; font-weight: $gl-font-weight-bold;
} }
> a { > a {
...@@ -371,7 +371,7 @@ header.navbar-gitlab-new { ...@@ -371,7 +371,7 @@ header.navbar-gitlab-new {
> a { > a {
&:last-of-type:not(:first-child) { &:last-of-type:not(:first-child) {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
...@@ -411,7 +411,7 @@ header.navbar-gitlab-new { ...@@ -411,7 +411,7 @@ header.navbar-gitlab-new {
.breadcrumbs-sub-title { .breadcrumbs-sub-title {
margin: 2px 0; margin: 2px 0;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1; line-height: 1;
ul { ul {
...@@ -430,7 +430,7 @@ header.navbar-gitlab-new { ...@@ -430,7 +430,7 @@ header.navbar-gitlab-new {
} }
&:last-child a { &:last-child a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
......
...@@ -46,7 +46,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -46,7 +46,7 @@ $new-sidebar-collapsed-width: 50px;
a { a {
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 10px 16px 10px 10px; padding: 10px 16px 10px 10px;
...@@ -70,8 +70,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -70,8 +70,7 @@ $new-sidebar-collapsed-width: 50px;
background-color: $white-light; background-color: $white-light;
} }
.project-title, .sidebar-context-title {
.group-title {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
...@@ -109,7 +108,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -109,7 +108,7 @@ $new-sidebar-collapsed-width: 50px;
} }
.badge, .badge,
.project-title { .sidebar-context-title {
display: none; display: none;
} }
...@@ -160,7 +159,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -160,7 +159,7 @@ $new-sidebar-collapsed-width: 50px;
> a { > a {
color: $active-color; color: $active-color;
font-weight: 700; font-weight: $gl-font-weight-bold;
} }
svg { svg {
...@@ -308,7 +307,7 @@ $new-sidebar-collapsed-width: 50px; ...@@ -308,7 +307,7 @@ $new-sidebar-collapsed-width: 50px;
.badge { .badge {
color: $active-color; color: $active-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.sidebar-sub-level-items { .sidebar-sub-level-items {
...@@ -474,6 +473,6 @@ $new-sidebar-collapsed-width: 50px; ...@@ -474,6 +473,6 @@ $new-sidebar-collapsed-width: 50px;
border-bottom-color: $active-border; border-bottom-color: $active-border;
.badge { .badge {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
padding-right: 35px; padding-right: 35px;
> strong { > strong {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
} }
.trigger-build-variable { .trigger-build-variable {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $code-color; color: $code-color;
} }
...@@ -378,7 +378,7 @@ ...@@ -378,7 +378,7 @@
} }
&.active { &.active {
font-weight: bold; font-weight: $gl-font-weight-bold;
.fa-arrow-right { .fa-arrow-right {
display: block; display: block;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
vertical-align: middle !important; vertical-align: middle !important;
a { a {
font-weight: normal; font-weight: $gl-font-weight-normal;
text-decoration: none; text-decoration: none;
} }
} }
......
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
.commit-sha { .commit-sha {
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
.gpg-popover-status { .gpg-popover-status {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1.5; line-height: 1.5;
} }
......
...@@ -23,7 +23,7 @@ $space-between-cards: 8px; ...@@ -23,7 +23,7 @@ $space-between-cards: 8px;
line-height: 1; line-height: 1;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
margin-left: 8px; margin-left: 8px;
font-weight: 500; font-weight: $gl-font-weight-normal;
a { a {
font-size: 18px; font-size: 18px;
...@@ -139,7 +139,7 @@ $space-between-cards: 8px; ...@@ -139,7 +139,7 @@ $space-between-cards: 8px;
.card-score-value { .card-score-value {
font-size: 16px; font-size: 16px;
color: $gl-text-color; color: $gl-text-color;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.card-score-big { .card-score-big {
...@@ -147,7 +147,7 @@ $space-between-cards: 8px; ...@@ -147,7 +147,7 @@ $space-between-cards: 8px;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
font-size: 22px; font-size: 22px;
padding: 10px 0; padding: 10px 0;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.card-buttons { .card-buttons {
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
} }
.stage-name { .stage-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
.header { .header {
font-size: 30px; font-size: 30px;
line-height: 38px; line-height: 38px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin: 0; margin: 0;
} }
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
&.title { &.title {
line-height: 19px; line-height: 19px;
font-size: 14px; font-size: 14px;
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-text-color; color: $gl-text-color;
} }
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
box-shadow: inset 2px 0 0 0 $active-item-blue; box-shadow: inset 2px 0 0 0 $active-item-blue;
.stage-name { .stage-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -404,7 +404,7 @@ ...@@ -404,7 +404,7 @@
color: $gl-link-color; color: $gl-link-color;
line-height: 1.3; line-height: 1.3;
vertical-align: top; vertical-align: top;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.fa { .fa {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
// "Changes suppressed. Click to show." link // "Changes suppressed. Click to show." link
.show-suppressed-diff { .show-suppressed-diff {
font-size: 110%; font-size: 110%;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
a { a {
float: left; float: left;
width: 35px; width: 35px;
font-weight: normal; font-weight: $gl-font-weight-normal;
&[disabled] { &[disabled] {
cursor: default; cursor: default;
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
background-color: transparent; background-color: transparent;
border: 0; border: 0;
color: $gl-link-color; color: $gl-link-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
&:hover, &:hover,
&:focus { &:focus {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
} }
.environments-folder-name { .environments-folder-name {
font-weight: normal; font-weight: $gl-font-weight-normal;
padding-top: 20px; padding-top: 20px;
} }
...@@ -246,13 +246,13 @@ ...@@ -246,13 +246,13 @@
} }
.text-metric-bold { .text-metric-bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.label-axis-text, .label-axis-text,
.text-metric-usage { .text-metric-usage {
fill: $black; fill: $black;
font-weight: 500; font-weight: $gl-font-weight-normal;
font-size: 12px; font-size: 12px;
} }
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
.event-title { .event-title {
@include str-truncated(calc(100% - 174px)); @include str-truncated(calc(100% - 174px));
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $list-text-color; color: $list-text-color;
} }
......
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
} }
.light { .light {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.no-value { .no-value {
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
display: block; display: block;
margin-top: 4px; margin-top: 4px;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.hide-expanded { .hide-expanded {
...@@ -689,7 +689,7 @@ ...@@ -689,7 +689,7 @@
.issuable-info, .issuable-info,
.task-status, .task-status,
.issuable-updated-at { .issuable-updated-at {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
a { a {
......
...@@ -75,7 +75,7 @@ ul.related-merge-requests > li { ...@@ -75,7 +75,7 @@ ul.related-merge-requests > li {
.merge-requests-title, .merge-requests-title,
.related-branches-title { .related-branches-title {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.merge-request-id { .merge-request-id {
...@@ -244,7 +244,7 @@ ul.related-merge-requests > li { ...@@ -244,7 +244,7 @@ ul.related-merge-requests > li {
strong { strong {
display: block; display: block;
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
} }
h1:first-child { h1:first-child {
font-weight: normal; font-weight: $gl-font-weight-normal;
margin-bottom: 0.68em; margin-bottom: 0.68em;
margin-top: 0; margin-top: 0;
font-size: 34px; font-size: 34px;
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
} }
a { a {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
padding: 15px; padding: 15px;
.login-heading h3 { .login-heading h3 {
font-weight: 300; font-weight: $gl-font-weight-normal;
line-height: 1.5; line-height: 1.5;
margin: 0 0 10px; margin: 0 0 10px;
} }
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
} }
label { label {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.submit-container { .submit-container {
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
} }
strong { strong {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
} }
.member { .member {
font-weight: bold; font-weight: $gl-font-weight-bold;
overflow-wrap: break-word; overflow-wrap: break-word;
word-break: break-all; word-break: break-all;
} }
......
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
@extend .ref-name; @extend .ref-name;
color: $gl-text-color; color: $gl-text-color;
font-weight: 600; font-weight: $gl-font-weight-bold;
overflow: hidden; overflow: hidden;
word-break: break-all; word-break: break-all;
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
.mr-widget-body { .mr-widget-body {
h4 { h4 {
float: left; float: left;
font-weight: 600; font-weight: $gl-font-weight-bold;
font-size: 14px; font-size: 14px;
line-height: inherit; line-height: inherit;
margin-top: 0; margin-top: 0;
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
} }
time { time {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
...@@ -249,7 +249,7 @@ ...@@ -249,7 +249,7 @@
} }
label { label {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.spacing { .spacing {
...@@ -257,12 +257,12 @@ ...@@ -257,12 +257,12 @@
} }
.bold { .bold {
font-weight: 600; font-weight: $gl-font-weight-bold;
color: $gl-gray-light; color: $gl-gray-light;
} }
.state-label { .state-label {
font-weight: 600; font-weight: $gl-font-weight-bold;
padding-right: 10px; padding-right: 10px;
} }
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
.text { .text {
span { span {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
p { p {
...@@ -505,7 +505,7 @@ ...@@ -505,7 +505,7 @@
.panel-new-merge-request { .panel-new-merge-request {
.panel-heading { .panel-heading {
padding: 5px 10px; padding: 5px 10px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 25px; line-height: 25px;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
padding: 10px 16px; padding: 10px 16px;
h4 { h4 {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.progress { .progress {
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
} }
.remaining-days strong { .remaining-days strong {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.milestone-stat { .milestone-stat {
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
.close { .close {
color: $white-light; color: $white-light;
opacity: 0.85; opacity: 0.85;
font-weight: normal; font-weight: $gl-font-weight-normal;
&:hover { &:hover {
opacity: 1; opacity: 1;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
.interval-pattern-form-group { .interval-pattern-form-group {
label { label {
margin-right: 10px; margin-right: 10px;
font-weight: normal; font-weight: $gl-font-weight-normal;
&[for='custom'] { &[for='custom'] {
margin-right: 0; margin-right: 0;
......
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
.branch-commit { .branch-commit {
.ref-name { .ref-name {
font-weight: bold; font-weight: $gl-font-weight-bold;
max-width: 120px; max-width: 120px;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
.build-name { .build-name {
float: right; float: right;
font-weight: 500; font-weight: $gl-font-weight-normal;
} }
.ci-status-icon-failed svg { .ci-status-icon-failed svg {
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
.stage { .stage {
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
font-weight: 500; font-weight: $gl-font-weight-normal;
vertical-align: middle; vertical-align: middle;
} }
} }
...@@ -420,7 +420,7 @@ ...@@ -420,7 +420,7 @@
.stage-name { .stage-name {
margin: 0 0 15px 10px; margin: 0 0 15px 10px;
font-weight: bold; font-weight: $gl-font-weight-bold;
width: 176px; width: 176px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -580,7 +580,7 @@ ...@@ -580,7 +580,7 @@
vertical-align: bottom; vertical-align: bottom;
display: inline-block; display: inline-block;
position: relative; position: relative;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
@mixin mini-pipeline-graph-color($color-light, $color-main, $color-dark) { @mixin mini-pipeline-graph-color($color-light, $color-main, $color-dark) {
...@@ -724,7 +724,7 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -724,7 +724,7 @@ button.mini-pipeline-graph-dropdown-toggle {
.mini-pipeline-graph-dropdown-item { .mini-pipeline-graph-dropdown-item {
padding: 3px 7px 4px; padding: 3px 7px 4px;
clear: both; clear: both;
font-weight: normal; font-weight: $gl-font-weight-normal;
line-height: 1.428571429; line-height: 1.428571429;
white-space: nowrap; white-space: nowrap;
margin: 0 5px; margin: 0 5px;
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
&::after { &::after {
content: "\00B7"; // Middle Dot content: "\00B7"; // Middle Dot
padding: 0 6px; padding: 0 6px;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
&:last-child { &:last-child {
...@@ -277,7 +277,7 @@ table.u2f-registrations { ...@@ -277,7 +277,7 @@ table.u2f-registrations {
.oauth-application-show { .oauth-application-show {
.scope-name { .scope-name {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
.scopes-list { .scopes-list {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
margin: -16px; margin: -16px;
.alert-link { .alert-link {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 24px; font-size: 24px;
font-weight: 400; font-weight: $gl-font-weight-normal;
line-height: 1; line-height: 1;
word-wrap: break-word; word-wrap: break-word;
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: $gl-font-weight-bold;
line-height: 13px; line-height: 13px;
letter-spacing: .4px; letter-spacing: .4px;
padding: 6px 14px; padding: 6px 14px;
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
} }
.option-title { .option-title {
font-weight: normal; font-weight: $gl-font-weight-normal;
display: inline-block; display: inline-block;
color: $gl-text-color; color: $gl-text-color;
} }
...@@ -575,7 +575,7 @@ a.deploy-project-label { ...@@ -575,7 +575,7 @@ a.deploy-project-label {
color: $gl-text-color-tertiary; color: $gl-text-color-tertiary;
transform: translateY(-50%); transform: translateY(-50%);
font-size: 12px; font-size: 12px;
font-weight: bold; font-weight: $gl-font-weight-bold;
line-height: 20px; line-height: 20px;
// Mobile // Mobile
...@@ -826,7 +826,7 @@ pre.light-well { ...@@ -826,7 +826,7 @@ pre.light-well {
.new-protected-tag { .new-protected-tag {
label { label {
margin-top: 6px; margin-top: 6px;
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
...@@ -853,7 +853,7 @@ pre.light-well { ...@@ -853,7 +853,7 @@ pre.light-well {
} }
&.is-active { &.is-active {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -952,7 +952,7 @@ pre.light-well { ...@@ -952,7 +952,7 @@ pre.light-well {
&::before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: normal; font-style: normal;
} }
} }
......
...@@ -182,7 +182,6 @@ ...@@ -182,7 +182,6 @@
padding: 5px 10px; padding: 5px 10px;
position: relative; position: relative;
border-top: 1px solid $white-normal; border-top: 1px solid $white-normal;
margin-top: -5px;
} }
#binary-viewer { #binary-viewer {
...@@ -267,7 +266,7 @@ ...@@ -267,7 +266,7 @@
display: inline-block; display: inline-block;
font-size: 10px; font-size: 10px;
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: $gl-font-weight-bold;
color: $gray-darkest; color: $gray-darkest;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
} }
h4 { h4 {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
} }
......
...@@ -94,7 +94,7 @@ input[type="checkbox"]:hover { ...@@ -94,7 +94,7 @@ input[type="checkbox"]:hover {
&::before { &::before {
font-family: FontAwesome; font-family: FontAwesome;
font-weight: normal; font-weight: $gl-font-weight-normal;
font-style: normal; font-style: normal;
} }
} }
......
...@@ -29,5 +29,5 @@ table .sherlock-code { ...@@ -29,5 +29,5 @@ table .sherlock-code {
.sherlock-line-samples-table .slow { .sherlock-line-samples-table .slow {
color: $red-500; color: $red-500;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
...@@ -108,14 +108,14 @@ ...@@ -108,14 +108,14 @@
margin: 0; margin: 0;
float: none; float: none;
display: inline-block; display: inline-block;
font-weight: normal; font-weight: $gl-font-weight-normal;
padding: 0 5px; padding: 0 5px;
line-height: inherit; line-height: inherit;
font-size: 14px; font-size: 14px;
} }
.action-name { .action-name {
font-weight: normal; font-weight: $gl-font-weight-normal;
} }
.todo-body { .todo-body {
...@@ -262,6 +262,6 @@ ...@@ -262,6 +262,6 @@
} }
a { a {
font-weight: 600; font-weight: $gl-font-weight-bold;
} }
} }
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
} }
.upload-link { .upload-link {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $md-link-color; color: $md-link-color;
} }
......
.gitlab-ui-dev-kit { .gitlab-ui-dev-kit {
> h2 { > h2 {
margin: 35px 0 20px; margin: 35px 0 20px;
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.example { .example {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} }
.light { .light {
font-weight: normal; font-weight: $gl-font-weight-normal;
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
h3 { h3 {
font-size: 19px; font-size: 19px;
font-weight: normal; font-weight: $gl-font-weight-normal;
margin: $gl-padding 0; margin: $gl-padding 0;
} }
} }
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
$xterm-fg-255: #eee; $xterm-fg-255: #eee;
.term-bold { .term-bold {
font-weight: bold; font-weight: $gl-font-weight-bold;
} }
.term-italic { .term-italic {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
.wiki h3 { .wiki h3 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: 600;
} }
header, header,
......
...@@ -10,6 +10,14 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController ...@@ -10,6 +10,14 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end end
end end
if Gitlab::LDAP::Config.enabled?
Gitlab::LDAP::Config.available_servers.each do |server|
define_method server['provider_name'] do
ldap
end
end
end
# Extend the standard message generation to accept our custom exception # Extend the standard message generation to accept our custom exception
def failure_message def failure_message
exception = env["omniauth.error"] exception = env["omniauth.error"]
......
...@@ -5,14 +5,6 @@ class SessionsController < Devise::SessionsController ...@@ -5,14 +5,6 @@ class SessionsController < Devise::SessionsController
skip_before_action :check_two_factor_requirement, only: [:destroy] skip_before_action :check_two_factor_requirement, only: [:destroy]
# Explicitly call protect from forgery before anything else. Otherwise the
# CSFR-token might be cleared before authentication is done. This was the case
# when LDAP was enabled and the `OmniauthCallbacksController` is loaded
#
# *Note:* `prepend: true` is the default for rails4, but this will be changed
# to `prepend: false` in rails5.
protect_from_forgery prepend: true, with: :exception
prepend_before_action :check_initial_setup, only: [:new] prepend_before_action :check_initial_setup, only: [:new]
prepend_before_action :authenticate_with_two_factor, prepend_before_action :authenticate_with_two_factor,
if: :two_factor_enabled?, only: [:create] if: :two_factor_enabled?, only: [:create]
......
# GroupsFinder
#
# Used to filter Groups by a set of params
#
# Arguments:
# current_user - which user is requesting groups
# params:
# owned: boolean
# parent: Group
# all_available: boolean (defaults to true)
#
# Users with full private access can see all groups. The `owned` and `parent`
# params can be used to restrict the groups that are returned.
#
# Anonymous users will never return any `owned` groups. They will return all
# public groups instead, even if `all_available` is set to false.
class GroupsFinder < UnionFinder class GroupsFinder < UnionFinder
def initialize(current_user = nil, params = {}) def initialize(current_user = nil, params = {})
@current_user = current_user @current_user = current_user
...@@ -16,13 +32,13 @@ class GroupsFinder < UnionFinder ...@@ -16,13 +32,13 @@ class GroupsFinder < UnionFinder
attr_reader :current_user, :params attr_reader :current_user, :params
def all_groups def all_groups
groups = [] return [owned_groups] if params[:owned]
return [Group.all] if current_user&.full_private_access?
if current_user
groups << Gitlab::GroupHierarchy.new(groups_for_ancestors, groups_for_descendants).all_groups
end
groups << Group.unscoped.public_to_user(current_user)
groups = []
groups << Gitlab::GroupHierarchy.new(groups_for_ancestors, groups_for_descendants).all_groups if current_user
groups << Group.unscoped.public_to_user(current_user) if include_public_groups?
groups << Group.none if groups.empty?
groups groups
end end
...@@ -39,4 +55,12 @@ class GroupsFinder < UnionFinder ...@@ -39,4 +55,12 @@ class GroupsFinder < UnionFinder
groups.where(parent: params[:parent]) groups.where(parent: params[:parent])
end end
def owned_groups
current_user&.groups || Group.none
end
def include_public_groups?
current_user.nil? || params.fetch(:all_available, true)
end
end end
...@@ -20,6 +20,9 @@ module ButtonHelper ...@@ -20,6 +20,9 @@ module ButtonHelper
def clipboard_button(data = {}) def clipboard_button(data = {})
css_class = data[:class] || 'btn-clipboard btn-transparent' css_class = data[:class] || 'btn-clipboard btn-transparent'
title = data[:title] || 'Copy to clipboard' title = data[:title] || 'Copy to clipboard'
button_text = data[:button_text] || ''
hide_tooltip = data[:hide_tooltip] || false
hide_button_icon = data[:hide_button_icon] || false
# This supports code in app/assets/javascripts/copy_to_clipboard.js that # This supports code in app/assets/javascripts/copy_to_clipboard.js that
# works around ClipboardJS limitations to allow the context-specific copy/pasting of plain text or GFM. # works around ClipboardJS limitations to allow the context-specific copy/pasting of plain text or GFM.
...@@ -35,17 +38,22 @@ module ButtonHelper ...@@ -35,17 +38,22 @@ module ButtonHelper
target = data.delete(:target) target = data.delete(:target)
data[:clipboard_target] = target if target data[:clipboard_target] = target if target
data = { toggle: 'tooltip', placement: 'bottom', container: 'body' }.merge(data) unless hide_tooltip
data = { toggle: 'tooltip', placement: 'bottom', container: 'body' }.merge(data)
end
content_tag :button, button_attributes = {
icon('clipboard', 'aria-hidden': 'true'),
class: "btn #{css_class}", class: "btn #{css_class}",
data: data, data: data,
type: :button, type: :button,
title: title, title: title,
aria: { aria: { label: title }
label: title }
}
content_tag :button, button_attributes do
concat(icon('clipboard', 'aria-hidden': 'true')) unless hide_button_icon
concat(button_text)
end
end end
def http_clone_button(project, placement = 'right', append_link: true) def http_clone_button(project, placement = 'right', append_link: true)
......
...@@ -17,6 +17,10 @@ module Ci ...@@ -17,6 +17,10 @@ module Ci
validates :pipeline, presence: true, unless: :importing? validates :pipeline, presence: true, unless: :importing?
validates :name, presence: true, unless: :importing? validates :name, presence: true, unless: :importing?
after_initialize do |stage|
self.status = DEFAULT_STATUS if self.status.nil?
end
state_machine :status, initial: :created do state_machine :status, initial: :created do
event :enqueue do event :enqueue do
transition created: :pending transition created: :pending
......
...@@ -1192,7 +1192,7 @@ class Repository ...@@ -1192,7 +1192,7 @@ class Repository
end end
def initialize_raw_repository def initialize_raw_repository
Gitlab::Git::Repository.new(project.repository_storage, disk_path + '.git') Gitlab::Git::Repository.new(project.repository_storage, disk_path + '.git', Gitlab::GlRepository.gl_repository(project, false))
end end
def circuit_breaker def circuit_breaker
......
...@@ -17,7 +17,7 @@ module Commits ...@@ -17,7 +17,7 @@ module Commits
new_commit = create_commit! new_commit = create_commit!
success(result: new_commit) success(result: new_commit)
rescue ValidationError, ChangeError, Gitlab::Git::Index::IndexError, Repository::CommitError, GitHooksService::PreReceiveError => ex rescue ValidationError, ChangeError, Gitlab::Git::Index::IndexError, Repository::CommitError, Gitlab::Git::HooksService::PreReceiveError => ex
error(ex.message) error(ex.message)
end end
......
module Users
module NewUserNotifier
def notify_new_user(user, reset_token)
log_info("User \"#{user.name}\" (#{user.email}) was created")
notification_service.new_user(user, reset_token) if reset_token
system_hook_service.execute_hooks_for(user, :create)
end
end
end
...@@ -14,7 +14,7 @@ class CreateBranchService < BaseService ...@@ -14,7 +14,7 @@ class CreateBranchService < BaseService
else else
error('Invalid reference name') error('Invalid reference name')
end end
rescue GitHooksService::PreReceiveError => ex rescue Gitlab::Git::HooksService::PreReceiveError => ex
error(ex.message) error(ex.message)
end end
......
...@@ -16,7 +16,7 @@ class DeleteBranchService < BaseService ...@@ -16,7 +16,7 @@ class DeleteBranchService < BaseService
else else
error('Failed to remove branch') error('Failed to remove branch')
end end
rescue GitHooksService::PreReceiveError => ex rescue Gitlab::Git::HooksService::PreReceiveError => ex
error(ex.message) error(ex.message)
end end
......
class GitHooksService
PreReceiveError = Class.new(StandardError)
attr_accessor :oldrev, :newrev, :ref
def execute(user, project, oldrev, newrev, ref)
@project = project
@user = Gitlab::GlId.gl_id(user)
@oldrev = oldrev
@newrev = newrev
@ref = ref
%w(pre-receive update).each do |hook_name|
status, message = run_hook(hook_name)
unless status
raise PreReceiveError, message
end
end
yield(self).tap do
run_hook('post-receive')
end
end
private
def run_hook(name)
hook = Gitlab::Git::Hook.new(name, @project)
hook.trigger(@user, oldrev, newrev, ref)
end
end
class GitOperationService class GitOperationService
attr_reader :user, :repository attr_reader :committer, :repository
def initialize(committer, new_repository)
committer = Gitlab::Git::Committer.from_user(committer) if committer.is_a?(User)
@committer = committer
def initialize(new_user, new_repository)
@user = new_user
@repository = new_repository @repository = new_repository
end end
...@@ -118,9 +120,9 @@ class GitOperationService ...@@ -118,9 +120,9 @@ class GitOperationService
end end
def with_hooks(ref, newrev, oldrev) def with_hooks(ref, newrev, oldrev)
GitHooksService.new.execute( Gitlab::Git::HooksService.new.execute(
user, committer,
repository.project, repository,
oldrev, oldrev,
newrev, newrev,
ref) do |service| ref) do |service|
......
...@@ -15,6 +15,10 @@ module Groups ...@@ -15,6 +15,10 @@ module Groups
return group return group
end end
if group_path.include?('/') && !Group.supports_nested_groups?
raise 'Nested groups are not supported on MySQL'
end
create_group_path create_group_path
end end
......
...@@ -49,7 +49,7 @@ module MergeRequests ...@@ -49,7 +49,7 @@ module MergeRequests
raise MergeError, 'Conflicts detected during merge' unless commit_id raise MergeError, 'Conflicts detected during merge' unless commit_id
merge_request.update(merge_commit_sha: commit_id) merge_request.update(merge_commit_sha: commit_id)
rescue GitHooksService::PreReceiveError => e rescue Gitlab::Git::HooksService::PreReceiveError => e
raise MergeError, e.message raise MergeError, e.message
rescue StandardError => e rescue StandardError => e
raise MergeError, "Something went wrong during merge: #{e.message}" raise MergeError, "Something went wrong during merge: #{e.message}"
......
...@@ -13,7 +13,7 @@ module Tags ...@@ -13,7 +13,7 @@ module Tags
new_tag = repository.add_tag(current_user, tag_name, target, message) new_tag = repository.add_tag(current_user, tag_name, target, message)
rescue Rugged::TagError rescue Rugged::TagError
return error("Tag #{tag_name} already exists") return error("Tag #{tag_name} already exists")
rescue GitHooksService::PreReceiveError => ex rescue Gitlab::Git::HooksService::PreReceiveError => ex
return error(ex.message) return error(ex.message)
end end
......
...@@ -21,7 +21,7 @@ module Tags ...@@ -21,7 +21,7 @@ module Tags
else else
error('Failed to remove tag') error('Failed to remove tag')
end end
rescue GitHooksService::PreReceiveError => ex rescue Gitlab::Git::HooksService::PreReceiveError => ex
error(ex.message) error(ex.message)
end end
......
module Users module Users
class CreateService < BaseService class CreateService < BaseService
include NewUserNotifier
def initialize(current_user, params = {}) def initialize(current_user, params = {})
@current_user = current_user @current_user = current_user
@params = params.dup @params = params.dup
...@@ -10,11 +12,7 @@ module Users ...@@ -10,11 +12,7 @@ module Users
@reset_token = user.generate_reset_token if user.recently_sent_password_reset? @reset_token = user.generate_reset_token if user.recently_sent_password_reset?
if user.save notify_new_user(user, @reset_token) if user.save
log_info("User \"#{user.name}\" (#{user.email}) was created")
notification_service.new_user(user, @reset_token) if @reset_token
system_hook_service.execute_hooks_for(user, :create)
end
user user
end end
......
module Users module Users
class UpdateService < BaseService class UpdateService < BaseService
include NewUserNotifier
def initialize(user, params = {}) def initialize(user, params = {})
@user = user @user = user
@params = params.dup @params = params.dup
...@@ -10,7 +12,11 @@ module Users ...@@ -10,7 +12,11 @@ module Users
assign_attributes(&block) assign_attributes(&block)
user_exists = @user.persisted?
if @user.save(validate: validate) if @user.save(validate: validate)
notify_new_user(@user, nil) unless user_exists
success success
else else
error(@user.errors.full_messages.uniq.join('. ')) error(@user.errors.full_messages.uniq.join('. '))
......
...@@ -13,7 +13,7 @@ class ValidateNewBranchService < BaseService ...@@ -13,7 +13,7 @@ class ValidateNewBranchService < BaseService
end end
success success
rescue GitHooksService::PreReceiveError => ex rescue Gitlab::Git::HooksService::PreReceiveError => ex
error(ex.message) error(ex.message)
end end
end end
%h3.page-title Authorization required
%main{ :role => "main" } %main{ :role => "main" }
%p.h4 .modal-no-backdrop
Authorize .modal-content
%strong.text-info= @pre_auth.client.name .modal-header
to use your account? %h3.page-title
Authorize
= link_to @pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer'
to use your account?
- if current_user.admin? .modal-body
.text-warning.prepend-top-20 - if current_user.admin?
%p .text-warning
= icon("exclamation-triangle fw") %p
You are an admin, which means granting access to = icon("exclamation-triangle fw")
%strong= @pre_auth.client.name You are an admin, which means granting access to
will allow them to interact with GitLab as an admin as well. Proceed with caution. %strong= @pre_auth.client.name
will allow them to interact with GitLab as an admin as well. Proceed with caution.
- if @pre_auth.scopes %p
#oauth-permissions You are about to authorize
%p This application will be able to: = link_to @pre_auth.client.name, @pre_auth.redirect_uri, target: '_blank', rel: 'noopener noreferrer'
%ul.text-info to use your account.
- @pre_auth.scopes.each do |scope| - if @pre_auth.scopes
%li= t scope, scope: [:doorkeeper, :scopes] This application will be able to:
%hr/ %ul
.actions - @pre_auth.scopes.each do |scope|
= form_tag oauth_authorization_path, method: :post do %li= t scope, scope: [:doorkeeper, :scopes]
= hidden_field_tag :client_id, @pre_auth.client.uid .form-actions.text-right
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri = form_tag oauth_authorization_path, method: :delete, class: 'inline' do
= hidden_field_tag :state, @pre_auth.state = hidden_field_tag :client_id, @pre_auth.client.uid
= hidden_field_tag :response_type, @pre_auth.response_type = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
= hidden_field_tag :scope, @pre_auth.scope = hidden_field_tag :state, @pre_auth.state
= hidden_field_tag :nonce, @pre_auth.nonce = hidden_field_tag :response_type, @pre_auth.response_type
= submit_tag "Authorize", class: "btn btn-success wide pull-left" = hidden_field_tag :scope, @pre_auth.scope
= form_tag oauth_authorization_path, method: :delete do = hidden_field_tag :nonce, @pre_auth.nonce
= hidden_field_tag :client_id, @pre_auth.client.uid = submit_tag "Deny", class: "btn btn-danger"
= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri = form_tag oauth_authorization_path, method: :post, class: 'inline' do
= hidden_field_tag :state, @pre_auth.state = hidden_field_tag :client_id, @pre_auth.client.uid
= hidden_field_tag :response_type, @pre_auth.response_type = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
= hidden_field_tag :scope, @pre_auth.scope = hidden_field_tag :state, @pre_auth.state
= hidden_field_tag :nonce, @pre_auth.nonce = hidden_field_tag :response_type, @pre_auth.response_type
= submit_tag "Deny", class: "btn btn-danger prepend-left-10" = hidden_field_tag :scope, @pre_auth.scope
= hidden_field_tag :nonce, @pre_auth.nonce
= submit_tag "Authorize", class: "btn btn-success prepend-left-10"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
h1 { h1 {
font-size: 56px; font-size: 56px;
line-height: 100px; line-height: 100px;
font-weight: normal; font-weight: 400;
color: #456; color: #456;
} }
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
h3 { h3 {
color: #456; color: #456;
font-size: 20px; font-size: 20px;
font-weight: normal; font-weight: 400;
line-height: 28px; line-height: 28px;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= link_to admin_root_path, title: 'Admin Overview' do = link_to admin_root_path, title: 'Admin Overview' do
.avatar-container.s40.settings-avatar .avatar-container.s40.settings-avatar
= icon('wrench') = icon('wrench')
.project-title Admin Area .sidebar-context-title Admin Area
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(controller: %w(dashboard admin projects users groups jobs runners cohorts), html_options: {class: 'home'}) do = nav_link(controller: %w(dashboard admin projects users groups jobs runners cohorts), html_options: {class: 'home'}) do
= link_to admin_root_path, title: 'Overview', class: 'shortcuts-tree' do = link_to admin_root_path, title: 'Overview', class: 'shortcuts-tree' do
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= link_to group_path(@group), title: @group.name do = link_to group_path(@group), title: @group.name do
.avatar-container.s40.group-avatar .avatar-container.s40.group-avatar
= image_tag group_icon(@group), class: "avatar s40 avatar-tile" = image_tag group_icon(@group), class: "avatar s40 avatar-tile"
.group-title .sidebar-context-title
= @group.name = @group.name
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: 'home' }) do = nav_link(path: ['groups#show', 'groups#activity', 'groups#subgroups'], html_options: { class: 'home' }) do
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= link_to profile_path, title: 'Profile Settings' do = link_to profile_path, title: 'Profile Settings' do
.avatar-container.s40.settings-avatar .avatar-container.s40.settings-avatar
= icon('user') = icon('user')
.project-title User Settings .sidebar-context-title User Settings
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(path: 'profiles#show', html_options: {class: 'home'}) do = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do
= link_to profile_path, title: 'Profile Settings' do = link_to profile_path, title: 'Profile Settings' do
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= link_to project_path(@project), title: @project.name do = link_to project_path(@project), title: @project.name do
.avatar-container.s40.project-avatar .avatar-container.s40.project-avatar
= project_icon(@project, alt: @project.name, class: 'avatar s40 avatar-tile') = project_icon(@project, alt: @project.name, class: 'avatar s40 avatar-tile')
.project-title .sidebar-context-title
= @project.name = @project.name
%ul.sidebar-top-level-items %ul.sidebar-top-level-items
= nav_link(path: ['projects#show', 'projects#activity', 'cycle_analytics#show'], html_options: { class: 'home' }) do = nav_link(path: ['projects#show', 'projects#activity', 'cycle_analytics#show'], html_options: { class: 'home' }) do
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
h3 { h3 {
color: #456; color: #456;
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: 600;
margin-bottom: 6px; margin-bottom: 6px;
} }
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
%ul %ul
- if can_update_issue - if can_update_issue
%li= link_to 'Edit', edit_project_issue_path(@project, @issue) %li= link_to 'Edit', edit_project_issue_path(@project, @issue)
- unless current_user == @issue.author / TODO: simplify condition back #36860
- if @issue.author && current_user != @issue.author
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue)) %li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
- if can_update_issue - if can_update_issue
%li= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, format: 'json'), class: "btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue' %li= link_to 'Close issue', issue_path(@issue, issue: { state_event: :close }, format: 'json'), class: "btn-close #{issue_button_visibility(@issue, true)}", title: 'Close issue'
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
%span.icon %span.icon
= custom_icon('ellipsis_v') = custom_icon('ellipsis_v')
%ul.dropdown-menu.more-actions-dropdown.dropdown-open-left %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left
%li
= clipboard_button(text: noteable_note_url(note), title: "Copy reference to clipboard", button_text: 'Copy link', hide_tooltip: true, hide_button_icon: true)
- unless is_current_user - unless is_current_user
%li %li
= link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do = link_to new_abuse_report_path(user_id: note.author.id, ref_url: noteable_note_url(note)) do
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
.prepend-top-default .prepend-top-default
%p.light %p.light
= _("Jobs for last week") = _("Pipelines for last week")
(#{date_from_to(Date.today - 7.days, Date.today)}) (#{date_from_to(Date.today - 7.days, Date.today)})
%canvas#weekChart{ height: 200 } %canvas#weekChart{ height: 200 }
.prepend-top-default .prepend-top-default
%p.light %p.light
= _("Jobs for last month") = _("Pipelines for last month")
(#{date_from_to(Date.today - 30.days, Date.today)}) (#{date_from_to(Date.today - 30.days, Date.today)})
%canvas#monthChart{ height: 200 } %canvas#monthChart{ height: 200 }
.prepend-top-default .prepend-top-default
%p.light %p.light
= _("Jobs for last year") = _("Pipelines for last year")
%canvas#yearChart.padded{ height: 250 } %canvas#yearChart.padded{ height: 250 }
%script#pipelinesChartsData{ type: "application/json" } %script#pipelinesChartsData{ type: "application/json" }
......
...@@ -11,5 +11,5 @@ ...@@ -11,5 +11,5 @@
%span.sr-only %span.sr-only
Clear search Clear search
- unless params[:snippets].eql? 'true' - unless params[:snippets].eql? 'true'
= render 'filter' if current_user = render 'filter'
= button_tag "Search", class: "btn btn-success btn-search" = button_tag "Search", class: "btn btn-success btn-search"
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
class: "hidden-xs hidden-sm btn btn-grouped btn-reopen #{issuable_button_visibility(issuable, false)}", title: "Reopen #{display_issuable_type}" class: "hidden-xs hidden-sm btn btn-grouped btn-reopen #{issuable_button_visibility(issuable, false)}", title: "Reopen #{display_issuable_type}"
- elsif can_update && !is_current_user - elsif can_update && !is_current_user
= render 'shared/issuable/close_reopen_report_toggle', issuable: issuable = render 'shared/issuable/close_reopen_report_toggle', issuable: issuable
- else - elsif issuable.author
/ TODO: change back to else #36860
= link_to 'Report abuse', new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)), = link_to 'Report abuse', new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)),
class: 'hidden-xs hidden-sm btn btn-grouped btn-close-color', title: 'Report abuse' class: 'hidden-xs hidden-sm btn btn-grouped btn-close-color', title: 'Report abuse'
...@@ -37,13 +37,15 @@ ...@@ -37,13 +37,15 @@
%li.divider.droplab-item-ignore %li.divider.droplab-item-ignore
%li.report-item{ data: { text: 'Report abuse', url: new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)), / TODO: remove condition #36860
button_class: "#{button_class} btn-close-color", toggle_class: "#{toggle_class} btn-close-color", method: '' } } - if issuable.author
%button.btn.btn-transparent %li.report-item{ data: { text: 'Report abuse', url: new_abuse_report_path(user_id: issuable.author.id, ref_url: issuable_url(issuable)),
= icon('check', class: 'icon') button_class: "#{button_class} btn-close-color", toggle_class: "#{toggle_class} btn-close-color", method: '' } }
.description %button.btn.btn-transparent
%strong.title Report abuse = icon('check', class: 'icon')
%p.text .description
Report %strong.title Report abuse
= display_issuable_type.pluralize %p.text
that are abusive, inappropriate or spam. Report
= display_issuable_type.pluralize
that are abusive, inappropriate or spam.
# Concern for enabling a few lines of exception backtraces in Sidekiq
module ExceptionBacktrace
extend ActiveSupport::Concern
included do
sidekiq_options backtrace: 5
end
end
class GroupDestroyWorker class GroupDestroyWorker
include Sidekiq::Worker include Sidekiq::Worker
include DedicatedSidekiqQueue include DedicatedSidekiqQueue
include ExceptionBacktrace
def perform(group_id, user_id) def perform(group_id, user_id)
begin begin
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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