Closed Bug 1442451 Opened 8 years ago Closed 8 years ago

Previously opened devtools are not closed when disable devtools policy is in use

Categories

(Firefox :: Enterprise Policies, defect)

60 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 60
Tracking Status
firefox60 --- verified
firefox61 --- verified

People

(Reporter: Abe_LV, Assigned: jdescottes)

References

Details

Attachments

(1 file)

Steps to reproduce: screen capture- https://testing-1.tinytake.com/sf/MjQwMTgxNV83Mjg3MjUw 1.Start Nightly 2.Open browser console [Ctrl +Shift+J] , Developer tools [F12], and toolbar [Shift+F2] 3.Set "browser.policies.enabled" to true and use "DisableDeveloperTools":true policy. 4. Restart the browser 5. Verify if all tools opened in step 2 are closed/exited/ Actual result: The user still has access to dev toolbar and browser console[some level]. Expected Result: Previously opened dev tools should be closed upon a restart
Flags: needinfo?(felipc)
Summary: Previously opened devtools are closed when disable devtools policy is in use → Previously opened devtools are not closed when disable devtools policy is in use
SessionStore calls[1] DevToolsShim.restoreDevToolsSession unconditionally, which checks the shim pref but not the policy pref. I imagine Julian has an opinion on how to proceed here. [1]: https://searchfox.org/mozilla-central/rev/61d400da1c692453c2dc2c1cf37b616ce13dea5b/browser/components/sessionstore/SessionStore.jsm#2859
Flags: needinfo?(jdescottes)
Thanks Abe for finding it. This is an edge case that doesn't sound like a blocker, but I imagine the fix will be simple. I'll let Julian handle it.
Flags: needinfo?(felipc)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Flags: needinfo?(jdescottes)
Good catch. We could either set the preference devtools.enabled to to false in devtools-startup in case devtools are disabled by policy, but for now I prefer to explicitly check this in the DevToolsShim. Hopefully we can reduce the complexity in Bug 1440675, but that should wait for the 61 cycle.
Comment on attachment 8955412 [details] Bug 1442451 - do not restore DevTools session when disabled by policy; https://reviewboard.mozilla.org/r/224594/#review230798 Thanks for working this! :) Looks reasonable to me.
Attachment #8955412 - Flags: review?(jryans) → review+
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c120740c252 do not restore DevTools session when disabled by policy;r=jryans
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
I retested this and it is verified as fixed. Previously opened devtools are now closed when 'disable devtools' policy is active
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: