Merge branch 'sharp/inverted-check' into 'master'

Inverted admin check.

See merge request veloren/veloren!2112
This commit is contained in:
Marcel 2021-04-12 10:45:23 +00:00
commit e3d1d3ddd1

View File

@ -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())
}