mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Inverted admin check.
This commit is contained in:
parent
e1020945dd
commit
dd1e06115e
@ -33,7 +33,7 @@ use common_net::{
|
|||||||
sync::WorldSyncExt,
|
sync::WorldSyncExt,
|
||||||
};
|
};
|
||||||
use common_sys::state::{BuildAreaError, BuildAreas};
|
use common_sys::state::{BuildAreaError, BuildAreas};
|
||||||
use core::{convert::TryFrom, time::Duration};
|
use core::{convert::TryFrom, ops::Not, time::Duration};
|
||||||
use hashbrown::HashSet;
|
use hashbrown::HashSet;
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use specs::{Builder, Entity as EcsEntity, Join, WorldExt};
|
use specs::{Builder, Entity as EcsEntity, Join, WorldExt};
|
||||||
@ -227,6 +227,7 @@ fn verify_not_hardcoded_admin(server: &mut Server, uuid: Uuid, reason: &str) ->
|
|||||||
.editable_settings()
|
.editable_settings()
|
||||||
.admins
|
.admins
|
||||||
.contains(&uuid)
|
.contains(&uuid)
|
||||||
|
.not()
|
||||||
.then_some(())
|
.then_some(())
|
||||||
.ok_or_else(|| reason.into())
|
.ok_or_else(|| reason.into())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user