Skip to content

Commit

Permalink
is_admin check
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Sep 29, 2024
1 parent 7abbcd7 commit 0db0feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ async fn minecraft_username_change(app: &State<App>, _limit_guard: RocketGoverno
let current_date_time = Utc::now();

// !cfg!(debug_assertions) = Not debug build
if current_date_time < release_date && !cfg!(debug_assertions) {
if current_date_time < release_date && !(cfg!(debug_assertions) || session.user.is_admin) {
return Err(ApiError::OptionError);
}

Expand Down

0 comments on commit 0db0feb

Please sign in to comment.