Skip to content
Snippets Groups Projects

Expose project settings in REST API only for maintainer+ users

Merged Hinam Mehra requested to merge 442899-update-project-rest-api into master
5 files
+ 47
43
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -7,7 +7,7 @@
@@ -7,7 +7,7 @@
let_it_be(:current_user) { create(:user) }
let_it_be(:current_user) { create(:user) }
let(:project) { private_project }
let(:project) { private_project }
let(:options) { { current_user: current_user } }
let(:options) { { current_user: current_user, statistics: true } }
let(:entity) { ::API::Entities::Project.new(project, options) }
let(:entity) { ::API::Entities::Project.new(project, options) }
subject(:json) { entity.as_json }
subject(:json) { entity.as_json }
@@ -45,8 +45,8 @@
@@ -45,8 +45,8 @@
:web_url, :readme_url, :forks_count, :avatar_url, :star_count, :last_activity_at,
:web_url, :readme_url, :forks_count, :avatar_url, :star_count, :last_activity_at,
:namespace, :container_registry_image_prefix, :_links, :empty_repo, :archived,
:namespace, :container_registry_image_prefix, :_links, :empty_repo, :archived,
:visibility, :owner, :open_issues_count, :description_html, :updated_at,
:visibility, :owner, :open_issues_count, :description_html, :updated_at,
:can_create_merge_request_in, :statistics, :shared_with_groups, :service_desk_address,
:can_create_merge_request_in, :statistics, :ci_config_path,
:issues_template, :merge_requests_template
:shared_with_groups, :service_desk_address, :issues_template, :merge_requests_template
)
)
end
end
end
end
@@ -63,8 +63,8 @@
@@ -63,8 +63,8 @@
:web_url, :readme_url, :forks_count, :avatar_url, :star_count, :last_activity_at,
:web_url, :readme_url, :forks_count, :avatar_url, :star_count, :last_activity_at,
:namespace, :container_registry_image_prefix, :_links, :empty_repo, :archived,
:namespace, :container_registry_image_prefix, :_links, :empty_repo, :archived,
:visibility, :owner, :open_issues_count, :description_html, :updated_at,
:visibility, :owner, :open_issues_count, :description_html, :updated_at,
:can_create_merge_request_in, :statistics, :shared_with_groups, :service_desk_address,
:can_create_merge_request_in, :statistics, :ci_config_path, :shared_with_groups,
:issues_template, :merge_requests_template
:service_desk_address, :issues_template, :merge_requests_template
)
)
end
end
end
end
@@ -86,7 +86,7 @@
@@ -86,7 +86,7 @@
:shared_runners_enabled, :lfs_enabled, :creator_id, :import_url, :import_type,
:shared_runners_enabled, :lfs_enabled, :creator_id, :import_url, :import_type,
:import_status, :import_error, :ci_config_path, :ci_default_git_depth,
:import_status, :import_error, :ci_config_path, :ci_default_git_depth,
:ci_forward_deployment_enabled, :ci_forward_deployment_rollback_allowed,
:ci_forward_deployment_enabled, :ci_forward_deployment_rollback_allowed,
:ci_outbound_job_token_scope_enabled, :ci_separated_caches,
:ci_job_token_scope_enabled, :ci_separated_caches,
:ci_allow_fork_pipelines_to_run_in_parent_project, :build_git_strategy,
:ci_allow_fork_pipelines_to_run_in_parent_project, :build_git_strategy,
:keep_latest_artifact, :restrict_user_defined_variables, :runners_token,
:keep_latest_artifact, :restrict_user_defined_variables, :runners_token,
:runner_token_expiration_interval, :group_runners_enabled, :auto_cancel_pending_pipelines,
:runner_token_expiration_interval, :group_runners_enabled, :auto_cancel_pending_pipelines,
Loading