-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refresh existing application lookup
- Loading branch information
Showing
5 changed files
with
134 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/features/lookup_table/use_cases/refresh_lookup_table.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from authentication.access_control import AccessControlList, assert_user_has_access | ||
from authentication.models import AccessLevel, User | ||
from features.lookup_table.use_cases.create_lookup_table import create_lookup_table_use_case | ||
from storage.internal.lookup_tables import get_lookup | ||
|
||
|
||
def refresh_lookup_table_use_case(lookup_id: str, user: User) -> None: | ||
assert_user_has_access(AccessControlList.default(), AccessLevel.WRITE, user) | ||
paths = get_lookup(lookup_id).paths | ||
return create_lookup_table_use_case(paths, lookup_id, user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters