We would like to request for an option to disable warning plugin's parsing and displaying of project source code (source code view feature); ideally having the ability to set it at instance/master level as well as project's parser level. 

      For very large project where we are more interest in tracking metric, we found this parse/displaying to be expensive on storage; in addition we notice view content permission is tied to job read permission (more open in our instance), instead workspace permission (limited to admin) - in our env with mix-ed repo with diff permission level but builds together, this can potentially exposes source code when we want intended to share build result/console output. 

       

          [JENKINS-61038] Add permissions for source code viewer

          Hang Dong created issue -

          Ulli Hafner added a comment -

          That makes sense to look into at a higher level. As already discussed with the coverage-api team it would make sense to extract the source code rendering into a new plugin that has all those features in a single place.

          Ulli Hafner added a comment - That makes sense to look into at a higher level. As already discussed with the coverage-api team it would make sense to extract the source code rendering into a new plugin that has all those features in a single place.
          Ulli Hafner made changes -
          Assignee Original: Ulli Hafner [ drulli ]
          Labels New: help-wanted
          Ulli Hafner made changes -
          Link New: This issue relates to JENKINS-62151 [ JENKINS-62151 ]
          Ulli Hafner made changes -
          Epic Link New: JENKINS-62153 [ 206075 ]
          Ulli Hafner made changes -
          Summary Original: Ability to disable source code view at master and/or project level New: Add option to disable source code persistence
          Ulli Hafner made changes -
          Summary Original: Add option to disable source code persistence New: Add permissions for source code viewer

          We use the cobertura coverage plugin that uses workspace permision to decide if source code can be viewed by a user or not. But if the same source contains warnings or static code analysis messages it will be visible regardles of the permissions.

          Can I help to get a solution for this?

          Harald Villinger added a comment - We use the cobertura coverage plugin that uses workspace permision to decide if source code can be viewed by a user or not. But if the same source contains warnings or static code analysis messages it will be visible regardles of the permissions. Can I help to get a solution for this?

          Ulli Hafner added a comment -

          If you are interested in providing a PR you are welcome! Using the workspace permission isn't exactly what we need, but it might be better than nothing.

          Ulli Hafner added a comment - If you are interested in providing a PR you are welcome! Using the workspace permission isn't exactly what we need, but it might be better than nothing.

          Roman Zwi added a comment -

          Quick workaround that worked for me:
          Configure a custom groovy parser that doesn't set the filename.
          So Warnings NG doesn't know the file name and can't do anything about it (this also avoids NoSuchFileException and storage issues).

          Roman Zwi added a comment - Quick workaround that worked for me: Configure a custom groovy parser that doesn't set the filename. So Warnings NG doesn't know the file name and can't do anything about it (this also avoids NoSuchFileException and storage issues).

            Unassigned Unassigned
            hangdong Hang Dong
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: