@@ -39,9 +39,6 @@ class Grommunio extends InterProcessData implements IBackend, ISearchProvider, I
3939 private $ stateFolder ;
4040 private $ userDeviceData ;
4141
42- // gromox config parameter for PR_EC_ENABLED_FEATURES / PR_EC_DISABLED_FEATURES
43- public const MOBILE_ENABLED = 'mobile ' ;
44-
4542 public const MAXAMBIGUOUSRECIPIENTS = 9999 ;
4643 public const FREEBUSYENUMBLOCKS = 50 ;
4744 public const MAXFREEBUSYSLOTS = 32767 ; // max length of 32k for the MergedFreeBusy element is allowed
@@ -3045,28 +3042,9 @@ private function getAddressbookDir() {
30453042 * @throws FatalException if user is disabled for grommunio-sync
30463043 */
30473044 private function isGSyncEnabled () {
3048- $ addressbook = $ this ->getAddressbook ();
30493045 // this check needs to be performed on the store of the main (authenticated) user
3050- $ storeProps = mapi_getprops ($ this ->storeCache [$ this ->mainUser ], [PR_MAILBOX_OWNER_ENTRYID , PR_EC_ENABLED_FEATURES_L ]);
3051- $ mobileDisabled = !($ storeProps [PR_EC_ENABLED_FEATURES_L ] & UP_EAS );
3052- if (!$ mobileDisabled ) {
3053- $ mailuser = mapi_ab_openentry ($ addressbook , $ storeProps [PR_MAILBOX_OWNER_ENTRYID ]);
3054- $ enabledFeatures = mapi_getprops ($ mailuser , [PR_EC_DISABLED_FEATURES , PR_SMTP_ADDRESS ]);
3055- // g-sync135: always use SMTP address (issue with altnames)
3056- if (isset ($ enabledFeatures [PR_SMTP_ADDRESS ])) {
3057- Request::SetUserIdentifier ($ enabledFeatures [PR_SMTP_ADDRESS ]);
3058- }
3059- if (isset ($ enabledFeatures [PR_EC_DISABLED_FEATURES ]) && is_array ($ enabledFeatures [PR_EC_DISABLED_FEATURES ])) {
3060- $ mobileDisabled = in_array (self ::MOBILE_ENABLED , $ enabledFeatures [PR_EC_DISABLED_FEATURES ]);
3061- $ deviceId = Request::GetDeviceID ();
3062- // Checks for deviceId present in zarafaDisabledFeatures LDAP array attribute. Check is performed case insensitive.
3063- $ deviceIdDisabled = (($ deviceId !== null ) && in_array ($ deviceId , array_map ('strtolower ' , $ enabledFeatures [PR_EC_DISABLED_FEATURES ]))) ? true : false ;
3064- if ($ deviceIdDisabled ) {
3065- throw new FatalException (sprintf ("User has deviceId %s disabled for usage with grommunio-sync. " , $ deviceId ));
3066- }
3067- }
3068- }
3069- if ($ mobileDisabled ) {
3046+ $ storeProps = mapi_getprops ($ this ->storeCache [$ this ->mainUser ], [PR_EC_ENABLED_FEATURES_L ]);
3047+ if (!($ storeProps [PR_EC_ENABLED_FEATURES_L ] & UP_EAS )) {
30703048 throw new FatalException ("User is disabled for grommunio-sync. " );
30713049 }
30723050
0 commit comments