mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Compare commits
26 Commits
f824549e18
...
right_befo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69c8bbc6b7 | ||
|
|
6a606a467e | ||
|
|
3d44e76383 | ||
|
|
038f4e294a | ||
|
|
9aa7138902 | ||
|
|
86cd481786 | ||
|
|
b3e09219a8 | ||
|
|
31293557ef | ||
|
|
3fe74bea54 | ||
|
|
6aa84305f6 | ||
|
|
06f0eaa3c7 | ||
|
|
5c927d009b | ||
|
|
bbd19bb513 | ||
|
|
8b2139727e | ||
|
|
e95740b52b | ||
|
|
bb90f81571 | ||
|
|
45ce6d8e8e | ||
|
|
dabba6b696 | ||
|
|
9bd81fa314 | ||
|
|
f5690c3384 | ||
|
|
665d7b543b | ||
|
|
7ba4f3658e | ||
|
|
0afc93958c | ||
|
|
d27bc213d4 | ||
|
|
589c01ed75 | ||
|
|
29db4dcf4d |
5
.github/actions/setup-project/action.yml
vendored
5
.github/actions/setup-project/action.yml
vendored
@@ -15,7 +15,10 @@ runs:
|
||||
python-version: "3.12.3"
|
||||
- name: Install poetry
|
||||
shell: bash
|
||||
run: pip install poetry==1.8.5
|
||||
run: pip install poetry==2.1.3
|
||||
- name: Install poetry export plugin
|
||||
shell: bash
|
||||
run: poetry self add poetry-plugin-export
|
||||
- name: Downgrade virtualenv to compatible version
|
||||
shell: bash
|
||||
run: pip install "virtualenv<20.30"
|
||||
|
||||
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
@@ -139,7 +139,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup-project
|
||||
- name: Create requirements.txt
|
||||
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
run: poetry export --output requirements.txt
|
||||
- uses: pypa/gh-action-pip-audit@v1.1.0
|
||||
with:
|
||||
inputs: requirements.txt
|
||||
|
||||
2
.github/workflows/daily_checks.yml
vendored
2
.github/workflows/daily_checks.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/setup-project
|
||||
- name: Create requirements.txt
|
||||
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
run: poetry export --output requirements.txt
|
||||
- uses: pypa/gh-action-pip-audit@v1.1.0
|
||||
with:
|
||||
inputs: requirements.txt
|
||||
|
||||
2
.github/workflows/deploy-demo.yml
vendored
2
.github/workflows/deploy-demo.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- uses: ./.github/actions/setup-project
|
||||
|
||||
- name: Create requirements.txt
|
||||
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
run: poetry export --output requirements.txt
|
||||
|
||||
- name: Deploy to cloud.gov
|
||||
uses: cloud-gov/cg-cli-tools@main
|
||||
|
||||
2
.github/workflows/deploy-prod.yml
vendored
2
.github/workflows/deploy-prod.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- uses: ./.github/actions/setup-project
|
||||
|
||||
- name: Create requirements.txt
|
||||
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
run: poetry export --output requirements.txt
|
||||
|
||||
- name: Deploy to cloud.gov
|
||||
uses: cloud-gov/cg-cli-tools@main
|
||||
|
||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -47,7 +47,7 @@ jobs:
|
||||
- uses: ./.github/actions/setup-project
|
||||
|
||||
- name: Create requirements.txt
|
||||
run: poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
run: poetry export --output requirements.txt
|
||||
|
||||
|
||||
- name: Deploy to cloud.gov
|
||||
|
||||
8
Makefile
8
Makefile
@@ -17,8 +17,7 @@ NVMSH := $(shell [ -f "$(HOME)/.nvm/nvm.sh" ] && echo "$(HOME)/.nvm/nvm.sh" || e
|
||||
.PHONY: bootstrap
|
||||
bootstrap: ## Set up everything to run the app
|
||||
make generate-version-file
|
||||
poetry lock --no-update
|
||||
poetry install --sync --no-root
|
||||
poetry sync --no-root
|
||||
poetry run playwright install --with-deps
|
||||
poetry run pre-commit install
|
||||
source $(NVMSH) --no-use && nvm install && npm install
|
||||
@@ -28,8 +27,7 @@ bootstrap: ## Set up everything to run the app
|
||||
.PHONY: bootstrap-with-git-hooks
|
||||
bootstrap-with-git-hooks: ## Sets everything up and accounts for pre-existing git hooks
|
||||
make generate-version-file
|
||||
poetry lock --no-update
|
||||
poetry install --sync --no-root
|
||||
poetry sync --no-root
|
||||
poetry run playwright install --with-deps
|
||||
git config --global --unset-all core.hooksPath
|
||||
poetry run pre-commit install
|
||||
@@ -129,7 +127,7 @@ py-lock: ## Syncs dependencies and updates lock file without performing recursiv
|
||||
|
||||
.PHONY: freeze-requirements
|
||||
freeze-requirements: ## create static requirements.txt
|
||||
poetry export --without-hashes --format=requirements.txt > requirements.txt
|
||||
poetry export --output requirements.txt
|
||||
|
||||
.PHONY: pip-audit
|
||||
pip-audit:
|
||||
|
||||
16
README.md
16
README.md
@@ -308,6 +308,22 @@ you'll be set with an upgraded version of Python.
|
||||
|
||||
_If you're not sure about the details of your current virtual environment, you can run `poetry env info` to get more information. If you've been using `pyenv` for everything, you can also see all available virtual environments with `pyenv virtualenvs`._
|
||||
|
||||
|
||||
#### Poetry upgrades ####
|
||||
|
||||
If you are doing a new project setup, then after you install poetry you need to install the export plugin
|
||||
|
||||
```sh
|
||||
poetry self add poetry-plugin-export
|
||||
```
|
||||
|
||||
If you are upgrading from poetry 1.8.5, you need to do this:
|
||||
|
||||
```sh
|
||||
curl -sSL https://install.python-poetry.org | python3 - --version 2.1.3
|
||||
poetry self add poetry-export-plugin
|
||||
```
|
||||
|
||||
#### Updating the .env file for Login.gov
|
||||
|
||||
To configure the application for Login.gov, you will need to update the following environment variables in the .env file:
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
let query = normalize($searchBox.val());
|
||||
let results = 0;
|
||||
let $noResultsMessage = $('.js-live-search-no-results');
|
||||
|
||||
$targets.each(function() {
|
||||
|
||||
@@ -39,6 +40,12 @@
|
||||
|
||||
});
|
||||
|
||||
if (query !== '' && results === 0) {
|
||||
$noResultsMessage.show();
|
||||
} else {
|
||||
$noResultsMessage.hide();
|
||||
}
|
||||
|
||||
if (state === 'loaded') {
|
||||
if (query !== '') {
|
||||
$searchBox.attr('aria-label', $searchLabel.text().trim() + ', ' + resultsSummary(results));
|
||||
|
||||
@@ -36,16 +36,21 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="user-list">
|
||||
<div class="js-live-search-no-results" style="display: none;">
|
||||
<p class="usa-body margin-0">No results found</p>
|
||||
</div>
|
||||
{% for user in users %}
|
||||
{% if user.status != 'cancelled' %}
|
||||
<div class="user-list-item width-full">
|
||||
<h2 class="user-list-item-heading font-body-lg margin-y-0" title="{{ user.email_address }}">
|
||||
{%- if user.name -%}
|
||||
<span class="heading-small live-search-relevant">{{ user.name }}</span>
|
||||
{%- else -%}
|
||||
<span class="heading-small live-search-relevant">{{ user.email_address }}</span>
|
||||
{%- endif -%}
|
||||
</h2>
|
||||
<p class="margin-top-0">
|
||||
{%- if user.status == 'pending' -%}
|
||||
{%- if user.status == 'pending' -%}
|
||||
<span class="live-search-relevant">{{ user.email_address }}</span>
|
||||
<span class="hint">(invited)</span>
|
||||
{%- elif user.status == 'expired' -%}
|
||||
@@ -79,7 +84,7 @@
|
||||
) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if current_service.all_template_folders %}
|
||||
{% if current_service.all_template_folders %}
|
||||
<p class="usa-body tick-cross-list-hint">
|
||||
{% set folder_count = user.template_folders_for_service(current_service) | length %}
|
||||
{% if folder_count == 0 %}
|
||||
@@ -105,7 +110,7 @@
|
||||
|
||||
{% if current_user.has_permissions('manage_service') %}
|
||||
{% if user.status == 'pending' or user.status == 'expired' %}
|
||||
<a class="user-list-edit-link usa-link" href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id) }}">
|
||||
<a class="user-list-edit-link usa-link padding-x-2" href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id) }}">
|
||||
Cancel invitation<span class="usa-sr-only"> for {{ user.email_address }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -115,7 +120,7 @@
|
||||
Resend invite<span class="usa-sr-only"> for {{ user.email_address }}</span>
|
||||
</a>
|
||||
{% elif user.is_editable_by(current_user) %}
|
||||
<a class="user-list-edit-link usa-link" href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id) }}">
|
||||
<a class="user-list-edit-link usa-link padding-x-2" href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id) }}">
|
||||
Change details<span class="usa-sr-only"> for {{ user.name }} {{ user.email_address }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
18
poetry.lock
generated
18
poetry.lock
generated
@@ -2379,14 +2379,14 @@ install = ["zstandard (>=0.21.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "phonenumbers"
|
||||
version = "9.0.5"
|
||||
version = "9.0.6"
|
||||
description = "Python version of Google's common library for parsing, formatting, storing and validating international phone numbers."
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "phonenumbers-9.0.5-py2.py3-none-any.whl", hash = "sha256:7acef19817868a6f9cbc0d628dc5ad447b3768137e3d53c70dd6827a1ac040ba"},
|
||||
{file = "phonenumbers-9.0.5.tar.gz", hash = "sha256:70fde168a92dd9c73f57872359515181d6cde6bb8e7ec5660e94c4ca45692c50"},
|
||||
{file = "phonenumbers-9.0.6-py2.py3-none-any.whl", hash = "sha256:b4a0f5a0dc30235b273d06acfe9afc2160cce4f1c8220067985ed81d72bb29a9"},
|
||||
{file = "phonenumbers-9.0.6.tar.gz", hash = "sha256:bfb228cfc4a5644f7c1a32ded1bd2ee6f8e3749e422fbdabd57661e86ad8872d"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3306,18 +3306,18 @@ all = ["numpy"]
|
||||
|
||||
[[package]]
|
||||
name = "redis"
|
||||
version = "6.1.0"
|
||||
version = "6.2.0"
|
||||
description = "Python client for Redis database and key-value store"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "redis-6.1.0-py3-none-any.whl", hash = "sha256:3b72622f3d3a89df2a6041e82acd896b0e67d9f54e9bcd906d091d23ba5219f6"},
|
||||
{file = "redis-6.1.0.tar.gz", hash = "sha256:c928e267ad69d3069af28a9823a07726edf72c7e37764f43dc0123f37928c075"},
|
||||
{file = "redis-6.2.0-py3-none-any.whl", hash = "sha256:c8ddf316ee0aab65f04a11229e94a64b2618451dab7a67cb2f77eb799d872d5e"},
|
||||
{file = "redis-6.2.0.tar.gz", hash = "sha256:e821f129b75dde6cb99dd35e5c76e8c49512a5a0d8dfdc560b2fbd44b85ca977"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
hiredis = ["hiredis (>=3.0.0)"]
|
||||
hiredis = ["hiredis (>=3.2.0)"]
|
||||
jwt = ["pyjwt (>=2.9.0)"]
|
||||
ocsp = ["cryptography (>=36.0.1)", "pyopenssl (>=20.0.1)", "requests (>=2.31.0)"]
|
||||
|
||||
@@ -4164,4 +4164,4 @@ cffi = ["cffi (>=1.11)"]
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = "^3.12.2"
|
||||
content-hash = "640d7ecd2d2e1de918fdcbe1900ce68a73f28819b5f73968c0535a1590be6f09"
|
||||
content-hash = "913c98fc4ee6270f0c8fff572b9aa9501d622550bdaa8cde313af78885dc7498"
|
||||
|
||||
@@ -50,10 +50,10 @@ geojson = "^3.1.0"
|
||||
jmespath = "^1.0.1"
|
||||
numpy = "^2.2.6"
|
||||
ordered-set = "^4.1.0"
|
||||
phonenumbers = "^9.0.5"
|
||||
phonenumbers = "^9.0.6"
|
||||
pycparser = "^2.22"
|
||||
python-json-logger = "^3.3.0"
|
||||
redis = "^6.1.0"
|
||||
redis = "^6.2.0"
|
||||
regex = "^2024.11.6"
|
||||
s3transfer = "^0.10.2"
|
||||
shapely = "^2.1.1"
|
||||
|
||||
@@ -1239,6 +1239,7 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service(
|
||||
(
|
||||
"pending",
|
||||
(
|
||||
"invited_user@test.gsa.gov "
|
||||
"invited_user@test.gsa.gov (invited) "
|
||||
"Permissions "
|
||||
"Can See dashboard "
|
||||
|
||||
Reference in New Issue
Block a user