Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-32981

Allow per-entity permissions for custom content types in the site search

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      It is possible for custom content types to appear in the dosearchsite.action results. Unfortunately it does not seem to be possible to control per-entity permissions in these results. This limits the usefulness of this feature.

      I have tried adding permissions via:

      contentEntity.addPermission(ContentPermission.createUserPermission(ContentPermission.VIEW_PERMISSION, user));
      

      but they seem to be ignores. Implementing the

      public boolean canView(User user, Object target)
      

      method in the permission delegate also does not work.

            [CONFSERVER-32981] Allow per-entity permissions for custom content types in the site search

            Atlassian update

            Thank you for raising this suggestion. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Sometimes potentially valuable tickets do get closed where the Summary or Description has not caught the attention of the community. If you feel that this suggestion is valuable, consider describing in more detail or outlining how this request will help you achieve your goals. We may then be able to provide better guidance.

            For more context, check out our Community blog on our renewed approach to highly voted Server suggestions for Jira and Confluence.

            Thanks again.
            Regards,
            Confluence Product Management

            Adam Barnes (Inactive) added a comment - Atlassian update Thank you for raising this suggestion. We regret to inform you that due to limited demand, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Sometimes potentially valuable tickets do get closed where the Summary or Description has not caught the attention of the community. If you feel that this suggestion is valuable, consider describing in more detail or outlining how this request will help you achieve your goals. We may then be able to provide better guidance. For more context, check out our Community blog on our renewed approach to highly voted Server suggestions for Jira and Confluence . Thanks again. Regards, Confluence Product Management

            One workaround for this is to implement an Extractor based on com.atlassian.confluence.search.lucene.extractor.ContentPermissionsExtractor.

            By adding your own encoded ContentPermissionSet to the ContentPermissionsExtractor.PERMISSION_SETS_FIELD you can get individual permissions for CustomContentEntities to be picked up by the ContentPermissionsFilter and 'correctly' filtered out.

            This is probably an abuse of the ContentPermissionsFilter, however until such time as the PermissionsDelegate.canView(User user, Object o) is called I don't currently see any other way - I'm more than willing to hear any suggestions as to a better approach.

            Alain Moran added a comment - One workaround for this is to implement an Extractor based on com.atlassian.confluence.search.lucene.extractor.ContentPermissionsExtractor. By adding your own encoded ContentPermissionSet to the ContentPermissionsExtractor.PERMISSION_SETS_FIELD you can get individual permissions for CustomContentEntities to be picked up by the ContentPermissionsFilter and 'correctly' filtered out. This is probably an abuse of the ContentPermissionsFilter, however until such time as the PermissionsDelegate.canView(User user, Object o) is called I don't currently see any other way - I'm more than willing to hear any suggestions as to a better approach.

              Unassigned Unassigned
              merickson Matthew Erickson
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: