mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 15:46:08 +10:00
Merge branch 'ce_upstream1' into 'master'
Ce upstream See merge request !349
This commit is contained in:
@@ -53,12 +53,15 @@ v 7.9.0 (unreleased)
|
||||
- Starred projects page at dashboard
|
||||
- Make email display name configurable
|
||||
- Improve json validation in hook data
|
||||
- Use Emoji One
|
||||
|
||||
v 7.8.4
|
||||
- Fix issue_tracker_id substitution in custom issue trackers
|
||||
- Fix path and name duplication in namespaces
|
||||
|
||||
v 7.8.3
|
||||
- Bump version of gitlab_git fixing annotated tags without message
|
||||
- Allow smb:// links in Markdown text.
|
||||
|
||||
v 7.8.2
|
||||
- Fix service migration issue when upgrading from versions prior to 7.3
|
||||
|
||||
@@ -89,7 +89,7 @@ gem "six"
|
||||
gem "seed-fu"
|
||||
|
||||
# Markup pipeline for GitLab
|
||||
gem 'html-pipeline-gitlab', '~> 0.1.0'
|
||||
gem 'html-pipeline-gitlab', '~> 0.1'
|
||||
|
||||
# Markdown to HTML
|
||||
gem "github-markup"
|
||||
@@ -196,7 +196,7 @@ gem "jquery-scrollto-rails"
|
||||
gem "raphael-rails", "~> 2.1.2"
|
||||
gem 'bootstrap-sass', '~> 3.0'
|
||||
gem "font-awesome-rails", '~> 4.2'
|
||||
gem "gitlab_emoji", "~> 0.0.1.1"
|
||||
gem "gitlab_emoji", "~> 0.1"
|
||||
gem "gon", '~> 5.0.0'
|
||||
gem 'nprogress-rails'
|
||||
gem 'request_store'
|
||||
|
||||
+9
-8
@@ -144,8 +144,6 @@ GEM
|
||||
email_spec (1.5.0)
|
||||
launchy (~> 2.1)
|
||||
mail (~> 2.2)
|
||||
emoji (1.0.1)
|
||||
json
|
||||
enumerize (0.7.0)
|
||||
activesupport (>= 3.2)
|
||||
equalizer (0.0.8)
|
||||
@@ -193,6 +191,8 @@ GEM
|
||||
formatador (0.2.4)
|
||||
gemnasium-gitlab-service (0.2.4)
|
||||
rugged (~> 0.21)
|
||||
gemojione (2.0.0)
|
||||
json
|
||||
gherkin-ruby (0.3.1)
|
||||
racc
|
||||
github-markup (1.3.1)
|
||||
@@ -211,8 +211,8 @@ GEM
|
||||
charlock_holmes (~> 0.6.6)
|
||||
escape_utils (~> 0.2.4)
|
||||
mime-types (~> 1.19)
|
||||
gitlab_emoji (0.0.1.1)
|
||||
emoji (~> 1.0.1)
|
||||
gitlab_emoji (0.1.0)
|
||||
gemojione (~> 2.0)
|
||||
gitlab_git (7.1.0)
|
||||
activesupport (~> 4.0)
|
||||
charlock_holmes (~> 0.6)
|
||||
@@ -278,10 +278,11 @@ GEM
|
||||
html-pipeline (1.11.0)
|
||||
activesupport (>= 2)
|
||||
nokogiri (~> 1.4)
|
||||
html-pipeline-gitlab (0.1.5)
|
||||
html-pipeline-gitlab (0.2.0)
|
||||
actionpack (~> 4)
|
||||
gitlab_emoji (~> 0.0.1)
|
||||
gitlab_emoji (~> 0.1)
|
||||
html-pipeline (~> 1.11.0)
|
||||
mime-types
|
||||
sanitize (~> 2.1)
|
||||
http_parser.rb (0.5.3)
|
||||
httparty (0.13.0)
|
||||
@@ -712,7 +713,7 @@ DEPENDENCIES
|
||||
gitlab-flowdock-git-hook (~> 0.4.2)
|
||||
gitlab-grack (~> 2.0.0.rc2)
|
||||
gitlab-linguist (~> 3.0.1)
|
||||
gitlab_emoji (~> 0.0.1.1)
|
||||
gitlab_emoji (~> 0.1)
|
||||
gitlab_git (= 7.1.0)
|
||||
gitlab_meta (= 7.0)
|
||||
gitlab_omniauth-ldap (= 1.2.0)
|
||||
@@ -725,7 +726,7 @@ DEPENDENCIES
|
||||
guard-spinach
|
||||
haml-rails
|
||||
hipchat (~> 1.4.0)
|
||||
html-pipeline-gitlab (~> 0.1.0)
|
||||
html-pipeline-gitlab (~> 0.1)
|
||||
httparty
|
||||
jasmine (= 2.0.2)
|
||||
jquery-atwho-rails (~> 0.3.3)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
.collapse-nav a {
|
||||
left: 0px;
|
||||
padding: 5px 23px 3px 22px;
|
||||
padding: 7px 23px 3px 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -155,12 +155,19 @@
|
||||
.collapse-nav a {
|
||||
position: fixed;
|
||||
top: 46px;
|
||||
padding: 5px 13px 3px 13px;
|
||||
padding: 5px 13px 5px 13px;
|
||||
left: 197px;
|
||||
font-size: 13px;
|
||||
background: #EEE;
|
||||
color: black;
|
||||
border: 1px solid rgba(0,0,0,0.035);
|
||||
border-left: 1px solid rgba(0,0,0,0.035);
|
||||
border-right: 1px solid rgba(0,0,0,0.035);
|
||||
}
|
||||
|
||||
.collapse-nav a:hover {
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
background: #eaeaea;
|
||||
}
|
||||
|
||||
@media (max-width: $screen-md-max) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class Groups::ApplicationController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def authorize_admin_group!
|
||||
unless can?(current_user, :manage_group, group)
|
||||
return render_404
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,4 @@
|
||||
class Groups::GroupMembersController < ApplicationController
|
||||
class Groups::GroupMembersController < Groups::ApplicationController
|
||||
before_filter :group
|
||||
|
||||
# Authorize
|
||||
@@ -75,12 +75,6 @@ class Groups::GroupMembersController < ApplicationController
|
||||
@group ||= Group.find_by(path: params[:group_id])
|
||||
end
|
||||
|
||||
def authorize_admin_group!
|
||||
unless can?(current_user, :manage_group, group)
|
||||
return render_404
|
||||
end
|
||||
end
|
||||
|
||||
def member_params
|
||||
params.require(:group_member).permit(:access_level, :user_id)
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class GroupsController < ApplicationController
|
||||
class GroupsController < Groups::ApplicationController
|
||||
skip_before_filter :authenticate_user!, only: [:show, :issues, :members, :merge_requests]
|
||||
respond_to :html
|
||||
before_filter :group, except: [:new, :create]
|
||||
@@ -134,12 +134,6 @@ class GroupsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def authorize_admin_group!
|
||||
unless can?(current_user, :manage_group, group)
|
||||
return render_404
|
||||
end
|
||||
end
|
||||
|
||||
def set_title
|
||||
@title = 'New Group'
|
||||
end
|
||||
|
||||
@@ -177,11 +177,11 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
|
||||
def autocomplete_emojis
|
||||
Rails.cache.fetch("autocomplete-emoji-#{Emoji::VERSION}") do
|
||||
Emoji.names.map do |e|
|
||||
Rails.cache.fetch("autocomplete-emoji-#{Gemojione::VERSION}") do
|
||||
Emoji.emojis.map do |name, emoji|
|
||||
{
|
||||
name: e,
|
||||
path: view_context.image_url("emoji/#{e}.png")
|
||||
name: name,
|
||||
path: view_context.image_url("emoji/#{emoji["unicode"]}.png")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -121,7 +121,7 @@ module GitlabMarkdownHelper
|
||||
end
|
||||
|
||||
def ignored_protocols
|
||||
["http://","https://", "ftp://", "mailto:"]
|
||||
["http://","https://", "ftp://", "mailto:", "smb://"]
|
||||
end
|
||||
|
||||
def rebuild_path(file_path)
|
||||
|
||||
@@ -50,6 +50,8 @@ module Gitlab
|
||||
# Version of your assets, change this if you want to expire all your assets
|
||||
config.assets.version = '1.0'
|
||||
|
||||
config.action_view.sanitized_allowed_protocols = %w(smb)
|
||||
|
||||
# Relative url support
|
||||
# Uncomment and customize the last line to run in a non-root path
|
||||
# WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this.
|
||||
|
||||
@@ -51,6 +51,7 @@ Xth: (5 working days before the 22nd)
|
||||
Xth: (4 working days before the 22nd)
|
||||
|
||||
- [ ] Update GitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package)
|
||||
- [ ] Update ci.gitLab.com with rc1 (#LINK) (https://dev.gitlab.org/cookbooks/chef-repo/blob/master/doc/administration.md#deploy-the-package)
|
||||
- [ ] Create regression issues (CE, CI) (#LINK)
|
||||
- [ ] Tweet about rc1 (#LINK)
|
||||
|
||||
@@ -68,6 +69,7 @@ Xth: (1 working day before the 22nd)
|
||||
- [ ] Create CE, EE, CI stable versions (#LINK)
|
||||
- [ ] Create Omnibus tags and build packages
|
||||
- [ ] Update GitLab.com with the stable version (#LINK)
|
||||
- [ ] Update ci.gitLab.com with the stable version (#LINK)
|
||||
|
||||
22nd:
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ CE=false be rake release['x.x.x']
|
||||
|
||||
1. [Build new packages with the latest version](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md)
|
||||
1. Apply the patch to GitLab.com and the private GitLab development server
|
||||
1. Apply the patch to ci.gitLab.com and the private GitLab CI development server
|
||||
1. Create and publish a blog post, see [patch release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/patch_release_blog_template.md)
|
||||
1. Send tweets about the release from `@gitlab`, tweet should include the most important feature that the release is addressing and link to the blog post
|
||||
1. Note in the 'GitLab X.X regressions' issue that the patch was published (CE only)
|
||||
|
||||
@@ -18,6 +18,7 @@ Please report suspected security vulnerabilities in private to <support@gitlab.c
|
||||
1. Do the steps from [patch release document](doc/release/patch.md), starting with "Create an issue on private GitLab development server"
|
||||
1. The MR with the security fix should get a 'security' label and be assigned to the release manager
|
||||
1. Build the package for GitLab.com and do a deploy
|
||||
1. Build the package for ci.gitLab.com and do a deploy
|
||||
1. [Create new AMIs](https://dev.gitlab.org/gitlab/AMI/blob/master/README.md)
|
||||
1. Create feature branches for the blog post on GitLab.com and link them from the code branch
|
||||
1. Merge and publish the blog posts
|
||||
|
||||
@@ -11,6 +11,12 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
||||
super options
|
||||
end
|
||||
|
||||
def preprocess(full_document)
|
||||
# Redcarpet doesn't allow SMB links when `safe_links_only` is enabled.
|
||||
# FTP links are allowed, so we trick Redcarpet.
|
||||
full_document.gsub("smb://", "ftp://smb:")
|
||||
end
|
||||
|
||||
# If project has issue number 39, apostrophe will be linked in
|
||||
# regular text to the issue as Redcarpet will convert apostrophe to
|
||||
# #39;
|
||||
@@ -55,6 +61,8 @@ class Redcarpet::Render::GitlabHTML < Redcarpet::Render::HTML
|
||||
end
|
||||
|
||||
def postprocess(full_document)
|
||||
full_document.gsub!("ftp://smb:", "smb://")
|
||||
|
||||
full_document.gsub!("’", "'")
|
||||
unless @template.instance_variable_get("@project_wiki") || @project.nil?
|
||||
full_document = h.create_relative_links(full_document)
|
||||
|
||||
@@ -713,19 +713,19 @@ describe GitlabMarkdownHelper do
|
||||
|
||||
it "should generate absolute urls for emoji" do
|
||||
expect(markdown(':smile:')).to(
|
||||
include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/smile.png))
|
||||
include(%(src="#{Gitlab.config.gitlab.url}/assets/emoji/#{Emoji.emoji_filename('smile')}.png))
|
||||
)
|
||||
end
|
||||
|
||||
it "should generate absolute urls for emoji if relative url is present" do
|
||||
allow(Gitlab.config.gitlab).to receive(:url).and_return('http://localhost/gitlab/root')
|
||||
expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/smile.png")
|
||||
expect(markdown(":smile:")).to include("src=\"http://localhost/gitlab/root/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
|
||||
end
|
||||
|
||||
it "should generate absolute urls for emoji if asset_host is present" do
|
||||
allow(Gitlab::Application.config).to receive(:asset_host).and_return("https://cdn.example.com")
|
||||
ActionView::Base.any_instance.stub_chain(:config, :asset_host).and_return("https://cdn.example.com")
|
||||
expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/smile.png")
|
||||
expect(markdown(":smile:")).to include("src=\"https://cdn.example.com/assets/emoji/#{Emoji.emoji_filename('smile')}.png")
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user