Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
4c11d43b
Commit
4c11d43b
authored
1 year ago
by
Nathan Bockisch
Browse files
Options
Downloads
Patches
Plain Diff
Make sure we don't spam scientists without meaning to
parent
ce6581d8
No related branches found
No related tags found
1 merge request
!1460
Make sure we don't spam scientists without meaning to
Checking pipeline status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/capability/capability/views/capability_version.py
+9
-0
9 additions, 0 deletions
services/capability/capability/views/capability_version.py
with
9 additions
and
0 deletions
services/capability/capability/views/capability_version.py
+
9
−
0
View file @
4c11d43b
...
...
@@ -34,6 +34,8 @@ from pyramid.view import view_config
logger
=
logging
.
getLogger
(
__name__
)
NOTIF_SETTINGS_KEY
=
"
edu.nrao.workspaces.NotificationSettings
"
from
workspaces.capability.enums
import
CapabilityVersionState
...
...
@@ -434,4 +436,11 @@ def get_user_email(request: Request) -> Response:
if
isinstance
(
email_list
,
list
):
user_email
=
"
,
"
.
join
(
email_list
)
logger
.
info
(
f
"
get_user_email endpoint retrieved:
{
user_email
}
"
)
# We only send emails to the PI/CoI in production!
email_pi
=
CapoConfig
().
getboolean
(
"
edu.nrao.workspaces.NotificationSettings.sendPIEmail
"
)
if
not
email_pi
:
user_email
=
CapoConfig
().
settings
(
NOTIF_SETTINGS_KEY
).
analystEmail
return
Response
(
status_int
=
http
.
HTTPStatus
.
OK
,
json_body
=
{
"
resp
"
:
f
"
{
user_email
}
"
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment