Closed Bug 1161606 Opened 6 years ago Closed 6 years ago
Implement a 'using
_permissions' context manager
39 bytes, text/x-review-board-request
We've implemented a push_permission method in Marionette which sets a requested permission. But it would be useful to have a 'with_permission' context manager that restores a permission to its original value on exit.
It would be nice if we can specify multiple permissions too, perhaps as a dict?
Assignee: nobody → jgriffin
Status: NEW → ASSIGNED
/r/8771 - Bug 1161606 - Implement 'using_permission' context manager, r=dburns Pull down this commit: hg pull -r a4d0170e0f83aef42947e2f5d06149decb783eef https://reviewboard-hg.mozilla.org/gecko/
Attachment #8605948 - Flags: review?(dburns)
Summary: Implement a 'with_permission' context manager → Implement a 'using_permissions' context manager
Comment on attachment 8605948 [details] MozReview Request: bz://1161606/jgriffin https://reviewboard.mozilla.org/r/8769/#review7577 Ship It!
Attachment #8605948 - Flags: review?(dburns) → review+
You need to log in before you can comment on or make changes to this bug.