We have a document management web application, which users use to collaborate on a document. There are 2 roles at the application level - Editor and Reviewer, and 3 rights at the document and document section level - Edit, Comment and View, View.

Documents can be shared between all users in the application. Documents can be shared at 2 levels

  • the entire document
  • specific sections

with any of the 3 rights - Edit, Comment, View.

Sharing at the document level is straightforward. If a document is shared with Edit rights, the user has Edit rights on all sections of the document automatically.

However, we are facing problems in formulating the access rights at the section level. For example, if the entire document is not shared with a user, and specific sections are to be shared, then should we allow users to be given different rights (Edit, Comment, View) on different sections?

The modules to be loaded for Edit, Comment, View rights are decided at the controller level for each component with authorization rights. The specific scenario which has us confused is if users are given different rights on different sections, the authorization needs to be called again, and the modules need to be reloaded. Ideally, we would like to avoid this.

How should we handle the authorization or module loads in this case?

Our web application is on a AngularJS + .Net WebAPI + MongoDB stack. I would really appreciate any help in clarifying our thought process on this problem.

  • First thing to get clear is, what is the functional requirement? Should it be allowed to just have authorization on a single section within a document, without any authorization on the actual document? Or should a user have view authorization on the document as a minimum? Also take into account presenting lists of documents for navigation purposes. – Jonathan van de Veen Oct 21 '15 at 11:41
  • Users can share the entire document with others, very similar to that in Google Docs. However, we maintain the section as a separate entity. In other words, a set of sections (internally stored as separate HTML files) makes up the entire document, and we show a list of sections on the left side in the document view. It is not needed to have authorization on the document in case access to a section is given. Access related records are stored either at document level or at section level. Hope this clarifies your questions. – Anurag Oct 21 '15 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.