public bool HasEntityRestriction(EntityRestrictionEnum restriction) { return (EntityRestriction & (int)restriction) == (int)restriction; }