Skip to content

Commit 15023d3

Browse files
Release OpenProject 12.0.7
2 parents 5b2a11f + 7816afd commit 15023d3

File tree

147 files changed

+659
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+659
-351
lines changed

app/controllers/wiki_controller.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,13 @@ def current_menu_item_sym(page)
341341
page = page_for_menu_item(page)
342342

343343
menu_item = page.try(:menu_item)
344+
return menu_item.menu_identifier if menu_item.present?
345+
return unless page
344346

345-
if menu_item.present?
346-
menu_item.menu_identifier
347-
elsif page.present?
348-
menu_item = default_menu_item(page)
349-
"no-menu-item-#{menu_item.menu_identifier}".to_sym
350-
end
347+
default_item = default_menu_item(page)
348+
return unless default_item
349+
350+
"no-menu-item-#{default_item.menu_identifier}".to_sym
351351
end
352352

353353
private

app/controllers/wiki_menu_items_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class WikiMenuItemsController < ApplicationController
3434
include Redmine::MenuManager::WikiMenuHelper
3535

3636
current_menu_item :edit do |controller|
37-
next controller.wiki_menu_item.menu_identifier if controller.wiki_menu_item.persisted?
37+
next controller.wiki_menu_item.menu_identifier if controller.wiki_menu_item.try(:persisted?)
3838

3939
project = controller.instance_variable_get(:@project)
4040
if (page = WikiPage.find_by(wiki_id: project.wiki.id, slug: controller.params[:id]))
@@ -52,6 +52,8 @@ class WikiMenuItemsController < ApplicationController
5252

5353
def self.default_menu_item(controller, page)
5454
menu_item = controller.default_menu_item(page)
55+
return unless menu_item
56+
5557
"no-menu-item-#{menu_item.menu_identifier}".to_sym
5658
end
5759

app/models/queries/notifications/notification_query.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ def self.model
3434
end
3535

3636
def default_scope
37-
Notification.recipient(user)
37+
Notification.visible(User.current).recipient(user)
3838
end
3939
end

app/models/repository.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def find_committer_user(committer)
285285
elsif committer.strip =~ /\A([^<]+)(<(.*)>)?\z/
286286
username = $1.strip
287287
email = $3
288-
u = User.find_by_login(username)
288+
u = User.by_login(username).first
289289
u ||= User.find_by_mail(email) unless email.blank?
290290
user = u
291291
end

app/views/admin/settings/api_settings/show.html.erb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ See COPYRIGHT and LICENSE files for more details.
2929
<%= toolbar title: t(:label_api_access_key_type) %>
3030

3131
<%= styled_form_tag(admin_settings_update_api_path, method: :patch) do %>
32+
<section class="form--section">
33+
<div class="form--field">
34+
<%= setting_number_field :apiv3_max_page_size, min: 50, container_class: '-slim' %>
35+
<div class="form--field-instructions">
36+
<p><%= t(:setting_apiv3_max_page_instructions_html) %></p>
37+
</div>
38+
</div>
39+
</section>
3240
<section class="form--section">
3341
<fieldset class="form--fieldset">
3442
<legend class="form--fieldset-legend"><%= I18n.t("setting_apiv3_docs") %></legend>

config/locales/crowdin/af.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ af:
752752
group_without_name: "Unnamed groups are not allowed."
753753
user:
754754
attributes:
755+
base:
756+
user_limit_reached: "User limit reached. No more accounts can be created on the current plan."
755757
password_confirmation:
756758
confirmation: "Password confirmation does not match password."
757759
format: "%{message}"
@@ -2341,6 +2343,9 @@ af:
23412343
setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) allowed origins"
23422344
setting_apiv3_cors_origins_text_html: >
23432345
If CORS is enabled, these are the origins that are allowed to access OpenProject API. <br/> Please check the <a href="%{origin_link}" target="_blank">Documentation on the Origin header</a> on how to specify the expected values.
2346+
setting_apiv3_max_page_size: "Maximum API page size"
2347+
setting_apiv3_max_page_instructions_html: >
2348+
Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page. <br/> <strong>Warning:</strong> Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views.
23442349
setting_apiv3_docs: "Dokumentasie"
23452350
setting_apiv3_docs_enabled: "Enable docs page"
23462351
setting_apiv3_docs_enabled_instructions_html: >

config/locales/crowdin/ar.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ ar:
756756
group_without_name: "Unnamed groups are not allowed."
757757
user:
758758
attributes:
759+
base:
760+
user_limit_reached: "User limit reached. No more accounts can be created on the current plan."
759761
password_confirmation:
760762
confirmation: "Password confirmation does not match password."
761763
format: "%{message}"
@@ -2415,6 +2417,9 @@ ar:
24152417
setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) allowed origins"
24162418
setting_apiv3_cors_origins_text_html: >
24172419
If CORS is enabled, these are the origins that are allowed to access OpenProject API. <br/> Please check the <a href="%{origin_link}" target="_blank">Documentation on the Origin header</a> on how to specify the expected values.
2420+
setting_apiv3_max_page_size: "Maximum API page size"
2421+
setting_apiv3_max_page_instructions_html: >
2422+
Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page. <br/> <strong>Warning:</strong> Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views.
24182423
setting_apiv3_docs: "التوثيق"
24192424
setting_apiv3_docs_enabled: "Enable docs page"
24202425
setting_apiv3_docs_enabled_instructions_html: >

config/locales/crowdin/az.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ az:
752752
group_without_name: "Unnamed groups are not allowed."
753753
user:
754754
attributes:
755+
base:
756+
user_limit_reached: "User limit reached. No more accounts can be created on the current plan."
755757
password_confirmation:
756758
confirmation: "Password confirmation does not match password."
757759
format: "%{message}"
@@ -2341,6 +2343,9 @@ az:
23412343
setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) allowed origins"
23422344
setting_apiv3_cors_origins_text_html: >
23432345
If CORS is enabled, these are the origins that are allowed to access OpenProject API. <br/> Please check the <a href="%{origin_link}" target="_blank">Documentation on the Origin header</a> on how to specify the expected values.
2346+
setting_apiv3_max_page_size: "Maximum API page size"
2347+
setting_apiv3_max_page_instructions_html: >
2348+
Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page. <br/> <strong>Warning:</strong> Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views.
23442349
setting_apiv3_docs: "Documentation"
23452350
setting_apiv3_docs_enabled: "Enable docs page"
23462351
setting_apiv3_docs_enabled_instructions_html: >

config/locales/crowdin/bg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ bg:
752752
group_without_name: "Unnamed groups are not allowed."
753753
user:
754754
attributes:
755+
base:
756+
user_limit_reached: "User limit reached. No more accounts can be created on the current plan."
755757
password_confirmation:
756758
confirmation: "Password confirmation does not match password."
757759
format: "%{message}"
@@ -2341,6 +2343,9 @@ bg:
23412343
setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) позволява разрешения"
23422344
setting_apiv3_cors_origins_text_html: >
23432345
Ако CORS е активиран, това са източниците, на които е разрешен достъп до API на OpenProject. <br/> Моля, проверете <a href="%{origin_link}" target="_blank"> Документацията в заглавието Origin </a> за това как да посочите очакваните стойности.
2346+
setting_apiv3_max_page_size: "Maximum API page size"
2347+
setting_apiv3_max_page_instructions_html: >
2348+
Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page. <br/> <strong>Warning:</strong> Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views.
23442349
setting_apiv3_docs: "Документация"
23452350
setting_apiv3_docs_enabled: "Enable docs page"
23462351
setting_apiv3_docs_enabled_instructions_html: >

config/locales/crowdin/ca.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,8 @@ ca:
749749
group_without_name: "Unnamed groups are not allowed."
750750
user:
751751
attributes:
752+
base:
753+
user_limit_reached: "User limit reached. No more accounts can be created on the current plan."
752754
password_confirmation:
753755
confirmation: "La confirmació de la contrasenya no coincideix."
754756
format: "%{message}"
@@ -2336,6 +2338,9 @@ ca:
23362338
setting_apiv3_cors_origins: "API V3 Cross-Origin Resource Sharing (CORS) allowed origins"
23372339
setting_apiv3_cors_origins_text_html: >
23382340
If CORS is enabled, these are the origins that are allowed to access OpenProject API. <br/> Please check the <a href="%{origin_link}" target="_blank">Documentation on the Origin header</a> on how to specify the expected values.
2341+
setting_apiv3_max_page_size: "Maximum API page size"
2342+
setting_apiv3_max_page_instructions_html: >
2343+
Set the maximum page size the API will respond with. It will not be possible to perform API requests that return more values on a single page. <br/> <strong>Warning:</strong> Please only change this value if you are sure why you need it. Setting to a high value will result in significant performance impacts, while a value lower than the per page options will cause errors in paginated views.
23392344
setting_apiv3_docs: "Documentació"
23402345
setting_apiv3_docs_enabled: "Enable docs page"
23412346
setting_apiv3_docs_enabled_instructions_html: >

0 commit comments

Comments
 (0)