Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Removed unnecessary code

Andreas Pfohl53acdea673bc
diff --git a/app/services/oauth_clients/connection_manager.rb b/app/services/oauth_clients/connection_manager.rb
index 0df0e6801ad..a51f44d0dc6 100644
--- a/app/services/oauth_clients/connection_manager.rb
+++ b/app/services/oauth_clients/connection_manager.rb
@@ -126,7 +126,7 @@ module OAuthClients
}
)
:connected
- rescue RestClient::Unauthorized, RestClient::Forbidden => _e
+ rescue RestClient::Unauthorized, RestClient::Forbidden
service_result = refresh_token # `refresh_token` already has exception handling
return :connected if service_result.success?
@@ -140,7 +140,7 @@ module OAuthClients
# to reload the page or contact an admin.
:error
end
- rescue StandardError => _e
+ rescue StandardError
:error
end
diff --git a/modules/storages/lib/api/v3/storages/storage_authorizer.rb b/modules/storages/lib/api/v3/storages/storage_authorizer.rb
index 8bbb0328b01..1b77c0b5fb0 100644
--- a/modules/storages/lib/api/v3/storages/storage_authorizer.rb
+++ b/modules/storages/lib/api/v3/storages/storage_authorizer.rb
@@ -32,9 +32,9 @@ module API
class StorageAuthorizer
class << self
def authorize(storage)
- oauth_client = storage.oauth_client
- connection_manager = ::OAuthClients::ConnectionManager.new(user: User.current, oauth_client:)
- connection_manager.authorization_state
+ ::OAuthClients::ConnectionManager
+ .new(user: User.current, oauth_client: storage.oauth_client)
+ .authorization_state
end
end
end