Skip to content

Commit

Permalink
Merge b912ee7 into 7984143
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Jun 3, 2020
2 parents 7984143 + b912ee7 commit fd20de9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions reana_server/config.py
Expand Up @@ -146,3 +146,7 @@ def _(x):
# Email configuration
# ===================
ADMIN_EMAIL = os.getenv('REANA_EMAIL_SENDER', 'CHANGE_ME')

# UI
# ==
REANA_UI_ANNOUNCEMENT = os.getenv('REANA_UI_ANNOUNCEMENT')
5 changes: 3 additions & 2 deletions reana_server/rest/users.py
Expand Up @@ -18,7 +18,7 @@
from reana_db.models import AuditLogAction
from reana_commons.email import send_email

from reana_server.config import ADMIN_EMAIL, REANA_URL
from reana_server.config import ADMIN_EMAIL, REANA_UI_ANNOUNCEMENT, REANA_URL
from reana_server.utils import (_create_user, _get_user_from_invenio_user,
_get_users, get_user_from_token)

Expand Down Expand Up @@ -339,7 +339,8 @@ def get_me():
if me.latest_access_token else None,
},
'full_name': me.full_name,
'username': me.username}), 200)
'username': me.username,
'announcement': REANA_UI_ANNOUNCEMENT}), 200)
return jsonify(message='User not logged in'), 401
except HTTPError as e:
logging.error(traceback.format_exc())
Expand Down

0 comments on commit fd20de9

Please sign in to comment.