a few changes based on MR feedback
This commit is contained in:
parent
bfced6fdb5
commit
2d4556c5d2
6 changed files with 17 additions and 10 deletions
|
@ -7,7 +7,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
before_action :assign_ref_vars, :tree, only: [:show], if: :repo_exists?
|
||||
|
||||
# Authorize
|
||||
before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping, :download_export, :export, :remove_export]
|
||||
before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping, :download_export, :export, :remove_export, :generate_new_export]
|
||||
before_action :event_filter, only: [:show, :activity]
|
||||
|
||||
layout :determine_layout
|
||||
|
@ -190,7 +190,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
|
||||
redirect_to(
|
||||
edit_project_path(@project),
|
||||
notice: "Project export started. A download link will be sent by e-mail."
|
||||
notice: "Project export started. A download link will be sent by email."
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -209,10 +209,16 @@ class ProjectsController < Projects::ApplicationController
|
|||
|
||||
def remove_export
|
||||
if @project.remove_exports
|
||||
redirect_to(
|
||||
edit_project_path(@project),
|
||||
notice: "Project export has been deleted."
|
||||
)
|
||||
flash[:notice] = "Project export has been deleted."
|
||||
else
|
||||
flash[:alert] = "Project export could not be deleted."
|
||||
end
|
||||
redirect_to(edit_project_path(@project))
|
||||
end
|
||||
|
||||
def generate_new_export
|
||||
if @project.remove_exports
|
||||
export
|
||||
else
|
||||
redirect_to(
|
||||
edit_project_path(@project),
|
||||
|
|
|
@ -123,7 +123,7 @@ class ApplicationSetting < ActiveRecord::Base
|
|||
default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'],
|
||||
default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'],
|
||||
restricted_signup_domains: Settings.gitlab['restricted_signup_domains'],
|
||||
import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git', 'gitlab_project'],
|
||||
import_sources: %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project],
|
||||
shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'],
|
||||
max_artifacts_size: Settings.artifacts['max_size'],
|
||||
require_two_factor_authentication: false,
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
- if @project.export_project_path
|
||||
= link_to 'Download export', download_export_namespace_project_path(@project.namespace, @project),
|
||||
method: :get, class: "btn btn-default"
|
||||
= link_to 'Delete export', remove_export_namespace_project_path(@project.namespace, @project),
|
||||
= link_to 'Generate new export', generate_new_export_namespace_project_path(@project.namespace, @project),
|
||||
method: :post, class: "btn btn-default"
|
||||
- else
|
||||
= link_to 'Export project', export_namespace_project_path(@project.namespace, @project),
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
$('.import_gitlab_project').click(function( event ) {
|
||||
if($('.import_gitlab_project').attr('disabled')) {
|
||||
event.preventDefault();
|
||||
new Flash("Project path required.", "alert");
|
||||
new Flash("Please enter a path for the project to be imported to.");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -461,6 +461,7 @@ Rails.application.routes.draw do
|
|||
post :markdown_preview
|
||||
post :export
|
||||
post :remove_export
|
||||
post :generate_new_export
|
||||
get :download_export
|
||||
get :autocomplete_sources
|
||||
get :activity
|
||||
|
|
|
@ -36,7 +36,7 @@ module Gitlab
|
|||
default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'],
|
||||
default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'],
|
||||
restricted_signup_domains: Settings.gitlab['restricted_signup_domains'],
|
||||
import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git', 'gitlab_project'],
|
||||
import_sources: %w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project],
|
||||
shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'],
|
||||
max_artifacts_size: Settings.artifacts['max_size'],
|
||||
require_two_factor_authentication: false,
|
||||
|
|
Loading…
Reference in a new issue