Closed
Bug 117228
Opened 23 years ago
Closed 23 years ago
Filepicker should use mode to do permissions checking
Categories
(SeaMonkey :: UI Design, defect, P1)
SeaMonkey
UI Design
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
(deleted),
patch
|
bryner
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
We seem to be getting a lot of bugs on lack of error dialogs when file writes
fail and the like. nsIFilePicker::init() already takes a "mode" argument. It
would make sense for the filepicker itself to use this mode argument to do
permissions checking and to simply not allow selection of a file with incorrect
permissions.
modeOpen -- the filepicker should allow only selection of files that the user
has permissions to read (test with an open() call?)
modeSave -- the filepicker should allow only selection of files in a directory
in which the user can create files if the selected file
doesn't already exist. If the file selected already exists the
filepicker should only allow selecting it if it's writable by the
user.
modeGetFolder -- not really clear what to do here. It seems this would be
better off as a flag that can be and-ed with the other two...
Assignee | ||
Updated•23 years ago
|
Comment 1•23 years ago
|
||
methinks this is similar to bug 115197, which i think was a regression recently
introduced with the new save page features. will need to check back on 115197
--but do let me know whether this is completely different [or related].
Assignee: pchen → ben
Assignee | ||
Comment 2•23 years ago
|
||
This is nothing like bug 115197. Bug 115197 is a result of a consumer of the
filepicker (the save as code) not checking permissions. This bug is a request
to move permissions-checking into the filepicker, where I feel it belongs, so
that consumers of the picker will not need to check permissions themselves.
This would fix a number of bugs, including the bugs this blocks and a similar
bug about permissions issues when printing, which I can't find at the moment.
Assignee | ||
Comment 3•23 years ago
|
||
Assignee | ||
Comment 4•23 years ago
|
||
taking
Comment 5•23 years ago
|
||
Comment on attachment 65705 [details] [diff] [review]
patch to fix file opening (which was not done in bug 114399) and some cleanup
r=bryner, looks good
Attachment #65705 -
Flags: review+
Comment 6•23 years ago
|
||
Comment on attachment 65705 [details] [diff] [review]
patch to fix file opening (which was not done in bug 114399) and some cleanup
sr=jag
Attachment #65705 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 7•23 years ago
|
||
checked into trunk.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•