Skip to content

Commit

Permalink
PREAPPS-7312: zimbraModernWebClientEnabled => zimbraModernWebClientDi…
Browse files Browse the repository at this point in the history
…sabled
  • Loading branch information
lavegupta authored and silentsakky committed Jun 15, 2023
1 parent 233ddf5 commit f8e2598
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11333,12 +11333,14 @@ public static TwoFactorAuthSecretEncoding fromString(String s) throws ServiceExc
public static final String A_zimbraMobileTombstoneEnabled = "zimbraMobileTombstoneEnabled";

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public static final String A_zimbraModernWebClientEnabled = "zimbraModernWebClientEnabled";
public static final String A_zimbraModernWebClientDisabled = "zimbraModernWebClientDisabled";

/**
* Value for postconf address_verify_negative_refresh_time
Expand Down
6 changes: 3 additions & 3 deletions store/conf/attrs/zimbra-attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10371,9 +10371,9 @@ TODO: delete them permanently from here
<desc>whether to enable CountObjectsRequest with userAccount/account type on Zimbra Admin Console</desc>
</attr>

<attr id="4100" name="zimbraModernWebClientEnabled" type="boolean" cardinality="single" optionalIn="globalConfig,domain" flags="domainInherited,domainInfo,domainAdminModifiable" since="10.1.0">
<globalConfigValue>TRUE</globalConfigValue>
<desc>Whether to enable/disable modern ui option on the login screen.</desc>
<attr id="4100" name="zimbraModernWebClientDisabled" type="boolean" cardinality="single" optionalIn="globalConfig,domain" flags="domainInherited,domainInfo,domainAdminModifiable" since="10.1.0">
<globalConfigValue>FALSE</globalConfigValue>
<desc>Whether to enable/disable the modern web client option on the login screen. Default value is FALSE, which makes the modern client option available.</desc>
</attr>
<attr id="4098" name="zimbraFeatureAllowUsernameInPassword" type="boolean" cardinality="single" optionalIn="account,cos,domain" flags="accountInfo,accountCosDomainInherited" since="10.1.0">
<defaultCOSValue>TRUE</defaultCOSValue>
Expand Down
46 changes: 28 additions & 18 deletions store/src/java/com/zimbra/cs/account/ZAttrConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -37805,74 +37805,84 @@ public Map<String,Object> unsetMobileMetadataRetentionPolicy(Map<String,Object>
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @return zimbraModernWebClientEnabled, or true if unset
* @return zimbraModernWebClientDisabled, or false if unset
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public boolean isModernWebClientEnabled() {
return getBooleanAttr(Provisioning.A_zimbraModernWebClientEnabled, true, true);
public boolean isModernWebClientDisabled() {
return getBooleanAttr(Provisioning.A_zimbraModernWebClientDisabled, false, true);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param zimbraModernWebClientEnabled new value
* @param zimbraModernWebClientDisabled new value
* @throws com.zimbra.common.service.ServiceException if error during update
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public void setModernWebClientEnabled(boolean zimbraModernWebClientEnabled) throws com.zimbra.common.service.ServiceException {
public void setModernWebClientDisabled(boolean zimbraModernWebClientDisabled) throws com.zimbra.common.service.ServiceException {
HashMap<String,Object> attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, zimbraModernWebClientEnabled ? TRUE : FALSE);
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, zimbraModernWebClientDisabled ? TRUE : FALSE);
getProvisioning().modifyAttrs(this, attrs);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param zimbraModernWebClientEnabled new value
* @param zimbraModernWebClientDisabled new value
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public Map<String,Object> setModernWebClientEnabled(boolean zimbraModernWebClientEnabled, Map<String,Object> attrs) {
public Map<String,Object> setModernWebClientDisabled(boolean zimbraModernWebClientDisabled, Map<String,Object> attrs) {
if (attrs == null) attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, zimbraModernWebClientEnabled ? TRUE : FALSE);
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, zimbraModernWebClientDisabled ? TRUE : FALSE);
return attrs;
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @throws com.zimbra.common.service.ServiceException if error during update
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public void unsetModernWebClientEnabled() throws com.zimbra.common.service.ServiceException {
public void unsetModernWebClientDisabled() throws com.zimbra.common.service.ServiceException {
HashMap<String,Object> attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, "");
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, "");
getProvisioning().modifyAttrs(this, attrs);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public Map<String,Object> unsetModernWebClientEnabled(Map<String,Object> attrs) {
public Map<String,Object> unsetModernWebClientDisabled(Map<String,Object> attrs) {
if (attrs == null) attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, "");
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, "");
return attrs;
}

Expand Down
46 changes: 28 additions & 18 deletions store/src/java/com/zimbra/cs/account/ZAttrDomain.java
Original file line number Diff line number Diff line change
Expand Up @@ -19182,74 +19182,84 @@ public Map<String,Object> unsetMobileMetadataMaxSizeEnabled(Map<String,Object> a
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @return zimbraModernWebClientEnabled, or true if unset
* @return zimbraModernWebClientDisabled, or false if unset
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public boolean isModernWebClientEnabled() {
return getBooleanAttr(Provisioning.A_zimbraModernWebClientEnabled, true, true);
public boolean isModernWebClientDisabled() {
return getBooleanAttr(Provisioning.A_zimbraModernWebClientDisabled, false, true);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param zimbraModernWebClientEnabled new value
* @param zimbraModernWebClientDisabled new value
* @throws com.zimbra.common.service.ServiceException if error during update
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public void setModernWebClientEnabled(boolean zimbraModernWebClientEnabled) throws com.zimbra.common.service.ServiceException {
public void setModernWebClientDisabled(boolean zimbraModernWebClientDisabled) throws com.zimbra.common.service.ServiceException {
HashMap<String,Object> attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, zimbraModernWebClientEnabled ? TRUE : FALSE);
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, zimbraModernWebClientDisabled ? TRUE : FALSE);
getProvisioning().modifyAttrs(this, attrs);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param zimbraModernWebClientEnabled new value
* @param zimbraModernWebClientDisabled new value
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public Map<String,Object> setModernWebClientEnabled(boolean zimbraModernWebClientEnabled, Map<String,Object> attrs) {
public Map<String,Object> setModernWebClientDisabled(boolean zimbraModernWebClientDisabled, Map<String,Object> attrs) {
if (attrs == null) attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, zimbraModernWebClientEnabled ? TRUE : FALSE);
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, zimbraModernWebClientDisabled ? TRUE : FALSE);
return attrs;
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @throws com.zimbra.common.service.ServiceException if error during update
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public void unsetModernWebClientEnabled() throws com.zimbra.common.service.ServiceException {
public void unsetModernWebClientDisabled() throws com.zimbra.common.service.ServiceException {
HashMap<String,Object> attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, "");
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, "");
getProvisioning().modifyAttrs(this, attrs);
}

/**
* Whether to enable/disable modern ui option on the login screen.
* Whether to enable/disable the modern web client option on the login
* screen. Default value is FALSE, which makes the modern client option
* available.
*
* @param attrs existing map to populate, or null to create a new map
* @return populated map to pass into Provisioning.modifyAttrs
*
* @since ZCS 10.1.0
*/
@ZAttr(id=4100)
public Map<String,Object> unsetModernWebClientEnabled(Map<String,Object> attrs) {
public Map<String,Object> unsetModernWebClientDisabled(Map<String,Object> attrs) {
if (attrs == null) attrs = new HashMap<String,Object>();
attrs.put(Provisioning.A_zimbraModernWebClientEnabled, "");
attrs.put(Provisioning.A_zimbraModernWebClientDisabled, "");
return attrs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class GetDomainInfo extends AdminDocumentHandler {
ZAttrProvisioning.A_zimbraPrefSkin,
ZAttrProvisioning.A_zimbraDomainLoginPagePath,
ZAttrProvisioning.A_zimbraDomainLoginPageFallbackPath,
ZAttrProvisioning.A_zimbraModernWebClientEnabled);
ZAttrProvisioning.A_zimbraModernWebClientDisabled);

@Override
public Element handle(Element request, Map<String, Object> context) throws ServiceException {
Expand Down

0 comments on commit f8e2598

Please sign in to comment.