Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Develop to Master, release v5.28.0 #187

Merged
merged 28 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
574da21
auto lint refactor
syphax-bouazzouni Apr 4, 2022
b7a4856
remove the Bioportal harder coded constant in notification subjects
syphax-bouazzouni Apr 4, 2022
d837cea
send the ontology pull failure notification also to the portal admins
syphax-bouazzouni Apr 4, 2022
339a268
adding a notification for new users creation
syphax-bouazzouni Apr 4, 2022
402e361
add a notification for new ontology creation
syphax-bouazzouni Apr 4, 2022
c66eaf0
removing duplicate if found in the notify recipients
syphax-bouazzouni Mar 31, 2022
c18270d
configurize the hardcoded Bioportal name
syphax-bouazzouni Apr 4, 2022
fcd5bbd
fix empty admin_emails value test
syphax-bouazzouni Apr 4, 2022
a31727c
extract the notifier (sender) from the notifications (the content)
syphax-bouazzouni Apr 4, 2022
90798af
add the ontology administrators to the processing notification targets
syphax-bouazzouni Apr 1, 2022
31d146e
replace ui_host with ui_name
syphax-bouazzouni Apr 4, 2022
ee73818
use ui_name in the tests
syphax-bouazzouni Apr 4, 2022
90bea9d
Merge branch 'master' into pl/refacotor-notification
syphax-bouazzouni May 26, 2022
10d3248
fix mailer configuration when using login auth option
syphax-bouazzouni Dec 1, 2023
f5b9478
refactor notifications of notes and reset password
syphax-bouazzouni Dec 1, 2023
e6f1dac
use id_url_prefix in generating note id instead of of hardcoded value
syphax-bouazzouni Dec 4, 2023
dca560d
Merge pull request #148 from ontoportal-lirmm/pl/refacotor-notification
alexskr Jan 18, 2024
6d193bd
notification refactor follow up
alexskr Feb 2, 2024
0913930
add enable_administrative_notifications condition
alexskr Feb 2, 2024
12daf06
add unit test for disabling administrative notifications
alexskr Feb 2, 2024
d0b6ad8
minor optimizations
alexskr Feb 3, 2024
87afcc4
Remove backward compatibility check.
alexskr Feb 5, 2024
247fb4d
Merge pull request #184 from ncbo/pr-refacotor-notification
alexskr Feb 5, 2024
073f79d
add attribute for storing reset token expire time
alexskr Feb 6, 2024
602a44c
fix archived submission notification email shows failure in subject
alexskr Feb 6, 2024
5900570
clean up created mappings after test is done.
alexskr Feb 7, 2024
885031c
bump up version of codecov GH action
alexskr Feb 7, 2024
1e8bd29
Merge pull request #186 from ncbo/expire_reset_passwd_tokens
alexskr Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ci_env=`bash <(curl -s https://codecov.io/env)`
docker-compose run $ci_env -e CI --rm ${{ matrix.backend }} bundle exec rake test TESTOPTS='-v'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: unittests
verbose: true
Expand Down
1 change: 1 addition & 0 deletions lib/ontologies_linked_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
require "ontologies_linked_data/utils/file"
require "ontologies_linked_data/utils/triples"
require "ontologies_linked_data/utils/notifications"
require "ontologies_linked_data/utils/notifier"
require "ontologies_linked_data/utils/ontology_csv_writer"
require "ontologies_linked_data/utils/multi_logger"
require "ontologies_linked_data/parser/parser"
Expand Down
32 changes: 15 additions & 17 deletions lib/ontologies_linked_data/config/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,18 @@ def config(&block)
@settings.search_server_url ||= 'http://localhost:8983/solr/term_search_core1'
@settings.property_search_server_url ||= 'http://localhost:8983/solr/prop_search_core1'
@settings.repository_folder ||= './test/data/ontology_files/repo'
@settings.rest_url_prefix ||= 'http://data.bioontology.org/'
@settings.rest_url_prefix ||= 'http://data.bioontology.org/'
@settings.enable_security ||= false
@settings.enable_slices ||= false

# Java/JVM options
@settings.java_max_heap_size ||= '10240M'
### these params should be not ussed any more
# removed so that dependencies shout
#
# @settings.redis_host ||= "localhost"
# @settings.redis_port ||= 6379
# ###

@settings.ui_name ||= 'Bioportal'
@settings.ui_host ||= 'bioportal.bioontology.org'
@settings.replace_url_prefix ||= false
@settings.id_url_prefix ||= 'http://data.bioontology.org/'
@settings.id_url_prefix ||= "http://data.bioontology.org/"

@settings.queries_debug ||= false
@settings.enable_monitoring ||= false
@settings.cube_host ||= 'localhost'
Expand All @@ -50,11 +46,11 @@ def config(&block)
@settings.http_redis_host ||= 'localhost'
@settings.http_redis_port ||= 6379

#Caching goo
# Caching goo
@settings.goo_redis_host ||= 'localhost'
@settings.goo_redis_port ||= 6379

#Ontology Analytics Redis
# Ontology Analytics Redis
@settings.ontology_analytics_redis_host ||= 'localhost'
@settings.ontology_analytics_redis_port ||= 6379

Expand All @@ -69,7 +65,8 @@ def config(&block)

# Email settings
@settings.enable_notifications ||= false
@settings.email_sender ||= '[email protected]' # Default sender for emails
# Default sender From email address
@settings.email_sender ||= '[email protected]'
@settings.email_override ||= '[email protected]' # By default, all email gets sent here. Disable with email_override_disable.
@settings.email_disable_override ||= false
@settings.smtp_host ||= 'localhost'
Expand All @@ -79,6 +76,13 @@ def config(&block)
@settings.smtp_auth_type ||= :none # :none, :plain, :login, :cram_md5
@settings.smtp_domain ||= 'localhost.localhost'
@settings.enable_starttls_auto ||= false # set to true for use with gmail
# Support contact email address used in email notification send to ontoportal users.
@settings.support_contact_email ||= '[email protected]'
# List of contact emails for OntoPortal site administrators
@settings.ontoportal_admin_emails ||= ['[email protected]']
# Send administrative notifications for events including new user and
# ontology creation to OntoPortal site admins
@settings.enable_administrative_notifications ||= true

# number of times to retry a query when empty records are returned
@settings.num_retries_4store ||= 10
Expand All @@ -89,12 +93,6 @@ def config(&block)
# Override defaults
yield @settings, overide_connect_goo if block_given?

unless @settings.redis_host.nil?
puts "Error: 'redis_host' is not a valid conf parameter."
puts ' Redis databases were split into multiple hosts (09/22/13).'
raise Exception, 'redis_host is not a valid conf parameter.'
end

# Check to make sure url prefix has trailing slash
@settings.rest_url_prefix = @settings.rest_url_prefix + '/' unless @settings.rest_url_prefix[-1].eql?('/')

Expand Down
3 changes: 2 additions & 1 deletion lib/ontologies_linked_data/models/users/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ class User < LinkedData::Models::Base
attribute :subscription, enforce: [:list, :subscription]
attribute :customOntology, enforce: [:list, :ontology]
attribute :resetToken
attribute :resetTokenExpireTime
attribute :provisionalClasses, inverse: { on: :provisional_class, attribute: :creator }

# Hypermedia settings
embed :subscription
embed_values :role => [:role]
serialize_default :username, :email, :role, :apikey
serialize_never :passwordHash, :show_apikey, :resetToken
serialize_never :passwordHash, :show_apikey, :resetToken, :restTokenExpireTime
serialize_filter lambda {|inst| show_apikey?(inst)}

# Cache
Expand Down
Loading
Loading