jeudi 12 mars 2015

Treat document libraries as file shares in SharePoint Foundation 2013

Firstly, we are using SharePoint Foundation 2013.

This may sound like a little strange, but let me try to explain:

We are generating Excel reports dynamically (server-side). We have decided to store the reports in a document library, since that makes it easier for us to handle things like permissions, etc.

However, the end-users will normally not visit the document library to open the reports, we have built our own UI for providing links for that.

Now, this works fine, except for one thing: When the user opens the document, Excel will show the standard warning saying "READ-ONLY We opened this workbook readonly from the server" and an "Edit workbook"-button. When the user clicks the button, a message saying "You don't have the right to edit the document". (This is not surprising, as the users don't have write permissions in the document library)

Now, the problem is mostly aesthetic, but our customer complain about the warning and the button, since they have no reason the edit the document anyway - they are simply viewing the documents as reports.

To get around the problem, our customer want us to store the files in a file share (outside SharePoint) and make the file share readonly for the end-users, but I would like to avoid that if possible.

So, what we would like is to have the document library that works just like a document library "sometimes" and like a file share "sometimes". Maybe be providing different URL:s depending on the situation.

(I have been thinking about implementing an HttpModule which would strip out the headers that tell Excel that this is a SharePoint document, but I don't know if that would work, and I don't know what the headers are and if this is a supported way)

Any ideas? Thanks /Fredrik

0 commentaires:

Enregistrer un commentaire