SEBSERV-355 added iPadOS and iOS & IPadOS

This commit is contained in:
anhefti 2023-01-26 12:57:21 +01:00
parent b9553c93ba
commit 558d6424f7
3 changed files with 17 additions and 5 deletions

View file

@ -29,12 +29,21 @@ public interface ClientGroupData extends Entity {
NONE(null), NONE(null),
WINDOWS("Windows"), WINDOWS("Windows"),
MAC_OS("macOS"), MAC_OS("macOS"),
I_OS("iOS"); I_OS("iOS"),
IPAD_OS("iPadOS"),
I_OS_OR_IPAD_OS("iOS", "iPadOS");
public final String queryString; public final String queryString1;
public final String queryString2;
private ClientOS(final String queryString) { private ClientOS(final String queryString1) {
this.queryString = queryString; this.queryString1 = queryString1;
this.queryString2 = null;
}
private ClientOS(final String queryString1, final String queryString2) {
this.queryString1 = queryString1;
this.queryString2 = queryString2;
} }
} }

View file

@ -37,7 +37,8 @@ public class ClientOSGroupMatcher implements ClientGroupConnectionMatcher {
try { try {
final ClientOS osType = ClientOS.valueOf(group.getData()); final ClientOS osType = ClientOS.valueOf(group.getData());
return clientConnection.info.contains(osType.queryString); return clientConnection.info.contains(osType.queryString1) ||
(osType.queryString2 != null && clientConnection.info.contains(osType.queryString2));
} catch (final Exception e) { } catch (final Exception e) {
return false; return false;
} }

View file

@ -84,6 +84,8 @@ sebserver.overall.seb.os.type.NONE=Undefined
sebserver.overall.seb.os.type.WINDOWS=Windows sebserver.overall.seb.os.type.WINDOWS=Windows
sebserver.overall.seb.os.type.MAC_OS=MacOS sebserver.overall.seb.os.type.MAC_OS=MacOS
sebserver.overall.seb.os.type.I_OS=iOS sebserver.overall.seb.os.type.I_OS=iOS
sebserver.overall.seb.os.type.IPAD_OS=IPadOS
sebserver.overall.seb.os.type.I_OS_OR_IPAD_OS=iOS or IPadOS
################################ ################################
# Form validation and messages # Form validation and messages