Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352302 - Opening a file in an editor depending on the client's permissions.
Summary: Opening a file in an editor depending on the client's permissions.
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Target (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 0.4.0   Edit
Assignee: William Chen CLA
QA Contact: Uwe Stieber CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-18 02:27 EDT by William Chen CLA
Modified: 2013-06-05 05:54 EDT (History)
3 users (show)

See Also:


Attachments
The fix patch. (14.29 KB, patch)
2011-07-19 23:28 EDT, William Chen CLA
uwe.st: iplog+
william.chen: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description William Chen CLA 2011-07-18 02:27:55 EDT
Build Identifier: 

Now you can right-click any file and get popup menu with a menu "Open", even if the current account does not have the permission to read it. Another problem is editing a read-only file is allowed although the user does not have writing permission. 
The "open" menu should only be visible when the user has read permission over the file. The editor should be read-only if the filed open is read-only.

Reproducible: Always

Steps to Reproduce:
1. Right-click on a file that the user does not have the right to read.
2. There's an "Open" menu item in the popup menu.
3. Right-click on a file that the user does not have the right to write.
4. Open the file in an editor and try to edit the file.
Comment 1 Martin Oberhuber CLA 2011-07-18 11:42:01 EDT
Moving to TCF Project.

This seems to be a TCF / RSE integration issue, since RSE 3.3 with the SSH subsystem does open files in read-only mode when they are read-only.
Comment 2 William Chen CLA 2011-07-19 23:20:23 EDT
Hi Martin,

I am talking about the Target Explorer. Shouldn't it belong to component "Target"?

-William
Comment 3 William Chen CLA 2011-07-19 23:28:52 EDT
Created attachment 199951 [details]
The fix patch.

Hi Uwe,

I made a patch for this bug. Could you please have a review over it?
Thanks.

-William
Comment 4 Uwe Stieber CLA 2011-07-21 02:10:22 EDT
Patch committed
Comment 5 William Chen CLA 2011-07-21 02:16:40 EDT
I, William Chen, declare that I developed the attached code from scratch,
without referencing any 3rd party materials except materials licensed under the
EPL. I am authorized by my employer to make this contribution under the EPL.

-William Chen