1
0
Fork 0
forked from gitea/nas

Change: #621 登録時間帯制限で、制限時間中は登録を禁止ではなく承認制にする (#628)

* Change: #621 登録時間帯制限で、制限時間中は登録を禁止ではなく承認制にする

* 管理画面のUIを改善

* Fix test

* Fix lint
This commit is contained in:
KMY(雪あすか) 2024-03-04 12:38:56 +09:00 committed by GitHub
parent 4119b8713e
commit 941705be62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 52 additions and 33 deletions

View file

@ -1,6 +1,8 @@
# frozen_string_literal: true
module ApplicationHelper
include RegistrationLimitationHelper
DANGEROUS_SCOPES = %w(
read
write
@ -37,11 +39,11 @@ module ApplicationHelper
end
def open_registrations?
Setting.registrations_mode == 'open'
Setting.registrations_mode == 'open' && registrations_in_time?
end
def approved_registrations?
Setting.registrations_mode == 'approved'
Setting.registrations_mode == 'approved' || (Setting.registrations_mode == 'open' && !registrations_in_time?)
end
def closed_registrations?