@@ -38,9 +38,6 @@ class Grommunio extends InterProcessData implements IBackend, ISearchProvider, I
3838 private $ stateFolder ;
3939 private $ userDeviceData ;
4040
41- // gromox config parameter for PR_EC_ENABLED_FEATURES / PR_EC_DISABLED_FEATURES
42- public const MOBILE_ENABLED = 'mobile ' ;
43-
4441 public const MAXAMBIGUOUSRECIPIENTS = 9999 ;
4542 public const FREEBUSYENUMBLOCKS = 50 ;
4643 public const MAXFREEBUSYSLOTS = 32767 ; // max length of 32k for the MergedFreeBusy element is allowed
@@ -3047,24 +3044,9 @@ private function getAddressbookDir() {
30473044 * @throws FatalException if user is disabled for grommunio-sync
30483045 */
30493046 private function isGSyncEnabled () {
3050- $ addressbook = $ this ->getAddressbook ();
30513047 // this check needs to be performed on the store of the main (authenticated) user
3052- $ storeProps = mapi_getprops ($ this ->storeCache [$ this ->mainUser ], [PR_MAILBOX_OWNER_ENTRYID , PR_EC_ENABLED_FEATURES_L ]);
3053- $ mobileDisabled = !($ storeProps [PR_EC_ENABLED_FEATURES_L ] & UP_EAS );
3054- if (!$ mobileDisabled ) {
3055- $ mailuser = mapi_ab_openentry ($ addressbook , $ storeProps [PR_MAILBOX_OWNER_ENTRYID ]);
3056- $ enabledFeatures = mapi_getprops ($ mailuser , [PR_EC_DISABLED_FEATURES ]);
3057- if (isset ($ enabledFeatures [PR_EC_DISABLED_FEATURES ]) && is_array ($ enabledFeatures [PR_EC_DISABLED_FEATURES ])) {
3058- $ mobileDisabled = in_array (self ::MOBILE_ENABLED , $ enabledFeatures [PR_EC_DISABLED_FEATURES ]);
3059- $ deviceId = Request::GetDeviceID ();
3060- // Checks for deviceId present in zarafaDisabledFeatures LDAP array attribute. Check is performed case insensitive.
3061- $ deviceIdDisabled = (($ deviceId !== null ) && in_array ($ deviceId , array_map ('strtolower ' , $ enabledFeatures [PR_EC_DISABLED_FEATURES ]))) ? true : false ;
3062- if ($ deviceIdDisabled ) {
3063- throw new FatalException (sprintf ("User has deviceId %s disabled for usage with grommunio-sync. " , $ deviceId ));
3064- }
3065- }
3066- }
3067- if ($ mobileDisabled ) {
3048+ $ storeProps = mapi_getprops ($ this ->storeCache [$ this ->mainUser ], [PR_EC_ENABLED_FEATURES_L ]);
3049+ if (!($ storeProps [PR_EC_ENABLED_FEATURES_L ] & UP_EAS )) {
30683050 throw new FatalException ("User is disabled for grommunio-sync. " );
30693051 }
30703052
0 commit comments