+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / built in library document list by user role

built in library document list by user role

2 posts, 1 answered
  1. Shriyal
    Shriyal avatar
    2 posts
    Registered:
    25 May 2016
    16 Aug
    Link to this post

    I have a library that is to be used by 2 roles, 1 being sub-set of other, like manager and non-manager employees.

    The documents are put in library based on certain business rule (say region). Managers may see all documents, non-manager may not see some of the documents.

    When I add a document with allow access to role=manager but login as employee, I still see the document listed there for manager. If I click on it, I get exception: You are not authorized to 'View document' ('Document').

    I would like to hide that document from the list, If it involves coding, I would like further pointers. If it is configuration, that too would help.

    Regards.

  2. Shriyal
    Shriyal avatar
    2 posts
    Registered:
    25 May 2016
    17 Aug in reply to Shriyal
    Link to this post

    This is for Sitefinity version 9 (might be useful otherwise too).

    As per documentation, hiding documents inside library do not have permissions. So we decided to use multiple libraries, put on same page. So this is workaround with multiple libraries, with own permissions by user role.

    In order to permissions work on document library, it is not sufficient, though necessary to set the permissions on library (root : as per documentation), it is also needed to setup a flag in the security settings in back-end > [Top menu] Administration > "Advanced" link > security left menu

    Check on the check-box for: Enable filtering queries by view permissions

    This will in turn modify config file "securityConfig.config". So you need to rebuild solution (just compile didn't help).

    Answered
2 posts, 1 answered