Skip to content

Commit

Permalink
fix: default event access key format (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulkr authored Nov 21, 2024
1 parent 9284bba commit 2442dea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion integrationos-api/src/logic/event_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,17 @@ pub async fn create_event_access_for_new_user(
..req
};

let event_access = generate_event_access(state.config.clone(), req).map_err(|e| {
let event_access = generate_event_access(state.config.clone(), req.clone()).map_err(|e| {
error!("Error generating event access for new user: {:?}", e);

InternalError::io_err("Could not generate event access", None)
})?;

let event_access = event_access.with_key(format!(
"event_access::custom::{}::default::event-inc::internal-ui",
req.environment
));

state
.app_stores
.event_access
Expand Down
7 changes: 7 additions & 0 deletions integrationos-domain/src/domain/event/event_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ pub struct EventAccess {
fn throughput_default() -> u64 {
500
}

impl EventAccess {
pub fn with_key(mut self, key: String) -> Self {
self.key = key;
self
}
}

0 comments on commit 2442dea

Please sign in to comment.