-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an export feature that allows project collaborators to export work order history from the history page. This feature enables users to download a zipped file containing all work orders, runs, steps, logs, and I/O data clips based on current filtering criteria. The export is processed in the background, uploaded to GCP storage, and a signed URL is sent via email. Download links expire after 24 hours, and users can view and download exports from the project files section under the Settings. --------- Co-authored-by: Stuart Corbishley <[email protected]> Co-authored-by: Frank Midigo <[email protected]> Co-authored-by: Taylor Downs <[email protected]>
- Loading branch information
1 parent
1927154
commit 19a7dbe
Showing
43 changed files
with
1,936 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,7 @@ benchmarking/*.csv | |
monitoring | ||
|
||
tmp | ||
exports | ||
priv/openfn | ||
|
||
.elixir_ls | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
defmodule Lightning.Policies.Exports do | ||
@moduledoc """ | ||
The Bodyguard Policy module for Exports | ||
""" | ||
@behaviour Bodyguard.Policy | ||
|
||
alias Lightning.Accounts.User | ||
alias Lightning.Projects | ||
alias Lightning.Projects.File, as: ProjectFile | ||
alias Lightning.Projects.Project | ||
|
||
@type actions :: :download | ||
|
||
@spec authorize(actions(), User.t(), ProjectFile.t()) :: | ||
boolean() | {:error, :forbidden} | ||
def authorize(:download, %User{} = user, %ProjectFile{project_id: project_id}) do | ||
Projects.member_of?(%Project{id: project_id}, user) or {:error, :forbidden} | ||
end | ||
end |
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
Oops, something went wrong.