Merge lp:~robertcarr/unity-mir/disable-authorizer-env into lp:unity-mir

Proposed by Robert Carr
Status: Rejected
Rejected by: Gerry Boland
Proposed branch: lp:~robertcarr/unity-mir/disable-authorizer-env
Merge into: lp:unity-mir
Diff against target: 39 lines (+17/-5)
1 file modified
src/unity-mir/shellserverconfiguration.cpp (+17/-5)
To merge this branch: bzr merge lp:~robertcarr/unity-mir/disable-authorizer-env
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Gerry Boland (community) Disapprove
Review via email: mp+188717@code.launchpad.net

Commit message

Add env variable to disable session authorizer for autopilot tests.

Description of the change

Add env variable to disable session authorizer for autopilot tests.

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

This should not be necessary. Apps can be launched not through shell in 2 ways:
1. using upstart-app-launch
2. by calling a binary, and appending a "--desktop_file_hint=/path/to/desktopfile.desktop" to the command line

review: Disapprove
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Sitting in queue, and not needed any more. Rejecting

Unmerged revisions

97. By Robert Carr

Add session authorizer env variable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-mir/shellserverconfiguration.cpp'
2--- src/unity-mir/shellserverconfiguration.cpp 2013-08-21 23:10:11 +0000
3+++ src/unity-mir/shellserverconfiguration.cpp 2013-10-01 21:11:33 +0000
4@@ -27,6 +27,9 @@
5 // mir
6 #include "mir/shell/organising_surface_factory.h"
7
8+// TODO: Remove after session authorization hack can be removed ~ racarr
9+#include <stdlib.h>
10+
11 namespace msh = mir::shell;
12 namespace ms = mir::surfaces;
13
14@@ -84,11 +87,20 @@
15 std::shared_ptr<mir::frontend::SessionAuthorizer>
16 ShellServerConfiguration::the_session_authorizer()
17 {
18- return session_authorizer(
19- [this]()
20- {
21- return std::make_shared<SessionAuthorizer>(the_session_manager());
22- });
23+ auto disable_authorizer = getenv("UNITY_MIR_DISABLE_SESSION_AUTHORIZER");
24+
25+ if (!disable_authorizer)
26+ {
27+ return session_authorizer(
28+ [this]()
29+ {
30+ return std::make_shared<SessionAuthorizer>(the_session_manager());
31+ });
32+ }
33+ else
34+ {
35+ return DefaultServerConfiguration::the_session_authorizer();
36+ }
37 }
38
39 // FIXME: Needed to detect the shell's surface - there must be a better way

Subscribers

People subscribed via source and target branches