-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass profile name instead of profile config struct
Makes testing easier, and stuff still needs to fetch stuff from the full config sometimes anyway. Signed-off-by: Robert Detjens <[email protected]>
- Loading branch information
1 parent
98bf272
commit c660a4f
Showing
5 changed files
with
20 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
use anyhow::{Error, Result}; | ||
|
||
use crate::configparser::{config, CONFIG}; | ||
use crate::configparser::{get_config, get_profile_config}; | ||
|
||
/// frontend dashbard access checks | ||
pub fn check(profile: &config::ProfileConfig) -> Result<()> { | ||
pub fn check(profile_name: &str) -> Result<()> { | ||
let profile = get_profile_config(profile_name)?; | ||
Ok(()) | ||
} |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
use anyhow::{Error, Result}; | ||
|
||
use crate::configparser::{config, CONFIG}; | ||
use crate::configparser::{get_config, get_profile_config}; | ||
|
||
/// s3 bucket access checks | ||
pub fn check(profile: &config::ProfileConfig) -> Result<()> { | ||
pub fn check(profile_name: &str) -> Result<()> { | ||
let profile = get_profile_config(profile_name)?; | ||
Ok(()) | ||
} |
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