mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sharp/inverted-check' into 'master'
Inverted admin check. See merge request veloren/veloren!2112
This commit is contained in:
commit
e3d1d3ddd1
@ -33,7 +33,7 @@ use common_net::{
|
||||
sync::WorldSyncExt,
|
||||
};
|
||||
use common_sys::state::{BuildAreaError, BuildAreas};
|
||||
use core::{convert::TryFrom, time::Duration};
|
||||
use core::{convert::TryFrom, ops::Not, time::Duration};
|
||||
use hashbrown::HashSet;
|
||||
use rand::Rng;
|
||||
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()
|
||||
.admins
|
||||
.contains(&uuid)
|
||||
.not()
|
||||
.then_some(())
|
||||
.ok_or_else(|| reason.into())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user