From 9fe8df3c1ba90a20351dd0ffd70319e5352a879d Mon Sep 17 00:00:00 2001 From: xiaoxiaoqiong Date: Mon, 20 Jun 2022 15:38:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?auth=20token=E8=BF=87=E6=9C=9F=E6=97=B6?= =?UTF-8?q?=E9=97=B47=E5=A4=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/initializers/doorkeeper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 4f9db8cdf..d80dcac68 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -101,12 +101,12 @@ Doorkeeper.configure do # Authorization Code expiration time (default: 10 minutes). # - # authorization_code_expires_in 10.minutes + authorization_code_expires_in 7.days # Access token expiration time (default: 2 hours). # If you want to disable expiration, set this to `nil`. # - # access_token_expires_in 2.hours + access_token_expires_in 7.days # Assign custom TTL for access tokens. Will be used instead of access_token_expires_in # option if defined. In case the block returns `nil` value Doorkeeper fallbacks to From 29e3a55a0ca2fe613cb3cf3154cbffc266a66378 Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 20 Jun 2022 16:36:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=82=80=E8=AF=B7=E9=93=BE=E6=8E=A5=E7=A7=81=E6=9C=89=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=97=A0=E6=B3=95=E8=AE=BF=E9=97=AE=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2ccd10ff9..952fa4483 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -688,7 +688,7 @@ class ApplicationController < ActionController::Base @project, @owner = Project.find_with_namespace(namespace, id) - if @project and current_user.can_read_project?(@project) + if @project and current_user.can_read_project?(@project) and controller_path == "projects/project_invite_links" logger.info "###########: has project and can read project" @project # elsif @project && current_user.is_a?(AnonymousUser)