Edgewall Software
Modify

Ticket #2268 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

Changeset View still shows code even if fileview permission is disallowed

Reported by: halkeye@… Owned by: cboos
Priority: normal Milestone: 0.10
Component: version control/changeset view Version: 0.8.4
Severity: normal Keywords: permissions review
Cc:
Release Notes:
API Changes:

Description

When you view a changeset, even without the FILE_VIEW permission, you can still view the changes.

Attachments

TRAC.changeset.patch.txt (1.3 KB) - added by halkeye@… 7 years ago.
patch to fix this
changeset_without_diffs-r3370.patch (3.0 KB) - added by cboos 6 years ago.
Here's a more complete patch, which also hides the diffs from the HTML view if the user doesn't have the FILE_VIEW permission, and even the list of changed files if the user doesn't have the BROWSER_VIEW permission.

Download all attachments as: .zip

Change History

Changed 7 years ago by halkeye@…

patch to fix this

comment:1 Changed 7 years ago by cmlenz

If you don't want someone to see your files, you'll have to deny them CHANGESET_VIEW permissions. Does viewing changesets make sense when you're not allowed to see the source?

comment:2 Changed 6 years ago by Arthaey

I actually would like to allow some users to see my changesets without seeing the source. I want them to see that I'm working on things, without them being able to see the text of the files I'm working on.

comment:3 Changed 6 years ago by cboos

  • Keywords permissions added
  • Milestone set to 0.10
  • Owner changed from jonas to cboos
  • Status changed from new to assigned

Makes sense. I'd be OK for the above patch. Others?

comment:4 Changed 6 years ago by cmlenz

FYI, a user can set the context of the diff to "*" or "all" and will see the complete text of any modified file.

Anyway, I can understand not providing the ZIP download when the user doesn't have FILE_VIEW permissions (because the ZIP will contain the complete files), but also removing the plain diff download doesn't make sense to me.

comment:5 Changed 6 years ago by cboos

The reasoning was that if the user doesn't have FILE_VIEW permissions,
he shouldn't be able to see any file content at all, even fragments of
them, by the way of diffs. See also #2671, marked as duplicate.

comment:6 Changed 6 years ago by cmlenz

But the only thing the patch does is remove the diff and ZIP export options, or am I missing something? If the user shouldn't see any file contents, we also need to remove the diffs from the generated HTML.

comment:7 Changed 6 years ago by cboos

Ah, the patch wasn't by me, and sure, it's not complete.
I'll post a more complete patch later this evening (after lunch ;) ).

Changed 6 years ago by cboos

Here's a more complete patch, which also hides the diffs from the HTML view if the user doesn't have the FILE_VIEW permission, and even the list of changed files if the user doesn't have the BROWSER_VIEW permission.

comment:8 Changed 6 years ago by cboos

  • Keywords review added

new patch uploaded

comment:9 Changed 6 years ago by cboos

  • Resolution set to fixed
  • Status changed from assigned to closed

Patch applied in r3384.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.