@@ -34,6 +34,7 @@ def checkFileInfo(fileid, acctok):
3434 acctok ['viewmode' ] = utils .ViewMode (acctok ['viewmode' ])
3535 acctok ['usertype' ] = utils .UserType (acctok ['usertype' ])
3636 statInfo = st .statx (acctok ['endpoint' ], acctok ['filename' ], acctok ['userid' ])
37+
3738 # populate metadata for this file
3839 fmd = {}
3940 fmd ['BaseFileName' ] = fmd ['BreadcrumbDocName' ] = os .path .basename (acctok ['filename' ])
@@ -77,7 +78,7 @@ def checkFileInfo(fileid, acctok):
7778 if acctok ['viewmode' ] != utils .ViewMode .VIEW_ONLY and srv .config .get ('general' , 'downloadurl' , fallback = None ):
7879 fmd ['DownloadUrl' ] = fmd ['FileUrl' ] = '%s?access_token=%s' % \
7980 (srv .config .get ('general' , 'downloadurl' ), flask .request .args ['access_token' ])
80- if srv .config .get ('general ' , 'businessflow' , fallback = 'True' ).upper () == 'TRUE' :
81+ if srv .config .get ('apps ' , 'businessflow' , fallback = 'True' ).upper () == 'TRUE' :
8182 # according to Microsoft, this must be enabled for all users
8283 fmd ['LicenseCheckForEditIsEnabled' ] = True
8384 fmd ['BreadcrumbBrandName' ] = srv .config .get ('general' , 'brandingname' , fallback = None )
@@ -105,11 +106,11 @@ def checkFileInfo(fileid, acctok):
105106 uinfo = statInfo ['xattrs' ].get (utils .USERINFOKEY + '.' + acctok ['wopiuser' ].split ('!' )[0 ])
106107 if uinfo :
107108 fmd ['UserInfo' ] = uinfo
108- if srv .config .get ('general' , 'earlyfeatures' , fallback = 'False' ).upper () == 'TRUE' :
109- fmd ['AllowEarlyFeatures' ] = True
110- fmd ['ComplianceDomainPrefix' ] = srv .config .get ('general' , 'compliancedomain' , fallback = 'euc' )
111109
112110 # populate app-specific metadata
111+ if srv .config .get ('apps' , 'earlyfeatures' , fallback = 'False' ).upper () == 'TRUE' :
112+ fmd ['AllowEarlyFeatures' ] = True
113+ fmd ['ComplianceDomainPrefix' ] = srv .config .get ('apps' , 'compliancedomain' , fallback = 'euc' )
113114 # the following is to enable the 'Edit in Word/Excel/PowerPoint' (desktop) action (probably broken)
114115 try :
115116 fmd ['ClientUrl' ] = srv .config .get ('general' , 'webdavurl' ) + '/' + acctok ['filename' ]
0 commit comments