Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bearbeiten von *.xlsm Dateien z.T. nicht möglich #4180

Closed
phgross opened this issue Apr 18, 2018 · 3 comments
Closed

Bearbeiten von *.xlsm Dateien z.T. nicht möglich #4180

phgross opened this issue Apr 18, 2018 · 3 comments
Labels

Comments

@phgross
Copy link
Member

phgross commented Apr 18, 2018

Ursache für die Probleme ist der Mimetype Check in der is_office_connector_editable Methode ( https://github.com/4teamwork/opengever.core/blob/master/opengever/document/document.py#L262), welcher case sensitive implementiert ist.

Beim fehlerhaften Dokumente wurde aber der Mimetype application/vnd.ms-excel.sheet.macroenabled.12 gesetzt. In der Konfigurationsliste steht aber nur die Schreibweise application/vnd.ms-excel.sheet.macroenabled.12.

@lukasgraf @Rotonen würdet ihr die Überprüfung case insensitive machen oder muss man dieses Dokument noch genauer untersuchen?

Extranet Issue

@phgross phgross added the Bug label Apr 18, 2018
@phgross phgross added this to the Release 2018.3 milestone Apr 18, 2018
@Rotonen
Copy link
Contributor

Rotonen commented Apr 18, 2018

Huh? Did you copy paste the wrong mimetype for the other?

>>> 'application/vnd.ms-excel.sheet.macroenabled.12' == 'application/vnd.ms-excel.sheet.macroenabled.12'
True

But trivial input lowercasing should indeed do the trick in regards to normalization as far as I can see.

`return self.content_type().lower() in api.portal.get_registry_record('opengever.officeconnector.interfaces.IOfficeConnectorSettings.officeconnector_editable_types')`

@deiferni
Copy link
Contributor

side note: in that case please also lower-case the values read from the registry or make sure the registry is always lower cased. it currently contains mixed case entries which would break.

@lukasgraf
Copy link
Member

👍 for case-insensitive comparisons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants