diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-03 20:43:24 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-03 20:43:24 +0800 |
commit | b0af0ab62fa7b0b64443e510ed388cef83db996d (patch) | |
tree | 4c8f383a9e79c8ad747962545a171f6a1c59c51f /app | |
parent | 9176a19e3d858a6d64a2254260febe000474af6d (diff) | |
parent | ca1096e77f1f44089cd8e37e2fe7fa392571542f (diff) | |
download | gitlab-ce-b0af0ab62fa7b0b64443e510ed388cef83db996d.tar.gz |
Merge remote-tracking branch 'upstream/master' into pipeline-notifications
* upstream/master: (26 commits)
Add a `--force` option to bin/changelog
Update examples in changelog docs to use single quotes around title
Use the server's base URL without relative URL part when creating links in JIRA
Make ESLint ignore instrumented files for coverage analysis (!7236)
Check that JavaScript file names match convention (!7238)
Removed z-index for filters on issue boards
GitLab 8.13 not 13
Replace MR Description Format links
Fix gdb backtrace command
Update gitlab.yml.example
remove extra spaces from app/workers/post_receive.rb
Add Rake task to create/repair GitLab Shell hooks symlinks
Added guide for upgrading Postgres using Slony
Ensure hook tokens are write-only in the API
Add support for token attr in project hooks API
Add a CHANGELOG entry
Fix edit button wiki
Updated Sortable JS plugin
Allow owners to fetch source code in CI builds
fixes milestone dropdown not select issue
...
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/pages/boards.scss | 9 | ||||
-rw-r--r-- | app/models/project_services/jira_service.rb | 2 | ||||
-rw-r--r-- | app/policies/project_policy.rb | 12 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/wikis/_form.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/wikis/_main_links.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/wikis/edit.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/_milestone_dropdown.html.haml | 4 | ||||
-rw-r--r-- | app/workers/post_receive.rb | 6 |
9 files changed, 26 insertions, 22 deletions
diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss index ef6833c9845..47a7e84b5c6 100644 --- a/app/assets/stylesheets/pages/boards.scss +++ b/app/assets/stylesheets/pages/boards.scss @@ -12,6 +12,10 @@ opacity: 1!important; * { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; // !important to make sure no style can override this when dragging cursor: -webkit-grabbing!important; cursor: grabbing!important; @@ -45,11 +49,6 @@ .page-with-sidebar { padding-bottom: 0; } - - .issues-filters { - position: relative; - z-index: 999999; - } } .boards-app { diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index 5bcf199d468..0a493b7a12b 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -237,7 +237,7 @@ class JiraService < IssueTrackerService end def resource_url(resource) - "#{Settings.gitlab['url'].chomp("/")}#{resource}" + "#{Settings.gitlab.base_url.chomp("/")}#{resource}" end def build_entity_url(entity_name, entity_id) diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb index fbb3d4507d6..1ee31023e26 100644 --- a/app/policies/project_policy.rb +++ b/app/policies/project_policy.rb @@ -2,11 +2,11 @@ class ProjectPolicy < BasePolicy def rules team_access!(user) - owner = user.admin? || - project.owner == user || + owner = project.owner == user || (project.group && project.group.has_owner?(user)) - owner_access! if owner + owner_access! if user.admin? || owner + team_member_owner_access! if owner if project.public? || (project.internal? && !user.external?) guest_access! @@ -16,7 +16,7 @@ class ProjectPolicy < BasePolicy can! :read_build if project.public_builds? if project.request_access_enabled && - !(owner || project.team.member?(user) || project_group_member?(user)) + !(owner || user.admin? || project.team.member?(user) || project_group_member?(user)) can! :request_access end end @@ -135,6 +135,10 @@ class ProjectPolicy < BasePolicy can! :destroy_issue end + def team_member_owner_access! + team_member_reporter_access! + end + # Push abilities on the users team role def team_access!(user) access = project.team.max_member_access(user.id) diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index ff6a899b92a..c40ad06969e 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -181,6 +181,7 @@ %ul %li Build traces and artifacts %li LFS objects + %li Container registry images %hr - if can? current_user, :archive_project, @project .row.prepend-top-default diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 6624d5cb427..4e41a15d9f4 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -33,7 +33,12 @@ .form-actions - if @page && @page.persisted? = f.submit 'Save changes', class: "btn-save btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel" + .pull-right + - if can?(current_user, :admin_wiki, @project) + = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-danger btn-grouped" do + Delete + = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, @page), class: "btn btn-cancel btn-grouped" - else = f.submit 'Create page', class: "btn-create btn" - = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel" + .pull-right + = link_to "Cancel", namespace_project_wiki_path(@project.namespace, @project, :home), class: "btn btn-cancel" diff --git a/app/views/projects/wikis/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 4ea75dbbf0c..763c2fea39b 100644 --- a/app/views/projects/wikis/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -7,6 +7,3 @@ - if can?(current_user, :create_wiki, @project) = link_to namespace_project_wiki_edit_path(@project.namespace, @project, @page), class: "btn" do Edit - - if can?(current_user, :admin_wiki, @project) - = link_to namespace_project_wiki_path(@project.namespace, @project, @page), data: { confirm: "Are you sure you want to delete this page?"}, method: :delete, class: "btn btn-remove" do - Delete diff --git a/app/views/projects/wikis/edit.html.haml b/app/views/projects/wikis/edit.html.haml index 233538bb488..679d6018bef 100644 --- a/app/views/projects/wikis/edit.html.haml +++ b/app/views/projects/wikis/edit.html.haml @@ -19,7 +19,5 @@ - if can?(current_user, :create_wiki, @project) = link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do New Page - = render 'main_links' - = render 'form' diff --git a/app/views/shared/issuable/_milestone_dropdown.html.haml b/app/views/shared/issuable/_milestone_dropdown.html.haml index f27a9002ec2..40fe53e6a8d 100644 --- a/app/views/shared/issuable/_milestone_dropdown.html.haml +++ b/app/views/shared/issuable/_milestone_dropdown.html.haml @@ -1,10 +1,10 @@ - project = @target_project || @project - extra_class = extra_class || '' - show_menu_above = show_menu_above || false -- selected_text = selected.try(:title) +- selected_text = selected.try(:title) || params[:milestone_title] - dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone") - if selected.present? - = hidden_field_tag(name, name == :milestone_title ? selected.title : selected.id) + = hidden_field_tag(name, name == :milestone_title ? selected_text : selected.id) = dropdown_tag(milestone_dropdown_label(selected_text), options: { title: dropdown_title, toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone", placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: show_menu_above, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do - if project diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index eee0ca12af9..2fff6b0105d 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -16,7 +16,7 @@ class PostReceive post_received = Gitlab::GitPostReceive.new(repo_path, identifier, changes) if post_received.project.nil? - log("Triggered hook for non-existing project with full path \"#{repo_path} \"") + log("Triggered hook for non-existing project with full path \"#{repo_path}\"") return false end @@ -25,7 +25,7 @@ class PostReceive elsif post_received.regular_project? process_project_changes(post_received) else - log("Triggered hook for unidentifiable repository type with full path \"#{repo_path} \"") + log("Triggered hook for unidentifiable repository type with full path \"#{repo_path}\"") false end end @@ -37,7 +37,7 @@ class PostReceive @user ||= post_received.identify(newrev) unless @user - log("Triggered hook for non-existing user \"#{post_received.identifier} \"") + log("Triggered hook for non-existing user \"#{post_received.identifier}\"") return false end |