Merge lp:~marcustomlinson/unity-scopes-api/oa_ui_policy into lp:unity-scopes-api/staging

Proposed by Marcus Tomlinson
Status: Merged
Merged at revision: 274
Proposed branch: lp:~marcustomlinson/unity-scopes-api/oa_ui_policy
Merge into: lp:unity-scopes-api/staging
Diff against target: 29 lines (+17/-1)
1 file modified
src/scopes/internal/OnlineAccountClientImpl.cpp (+17/-1)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-api/oa_ui_policy
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+244269@code.launchpad.net

Commit message

Use SIGNON_POLICY_NO_USER_INTERACTION by default unless UNITY_SCOPES_OA_UI_POLICY env var is set.

To post a comment you must log in.
274. By Marcus Tomlinson

Merged staging

Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/scopes/internal/OnlineAccountClientImpl.cpp'
2--- src/scopes/internal/OnlineAccountClientImpl.cpp 2014-12-03 10:44:45 +0000
3+++ src/scopes/internal/OnlineAccountClientImpl.cpp 2014-12-10 10:18:08 +0000
4@@ -163,8 +163,24 @@
5 }
6
7 // Get authorization parameters then attempt to signon
8+ GVariantBuilder builder;
9+ g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT);
10+
11+ if (getenv("UNITY_SCOPES_OA_UI_POLICY"))
12+ {
13+ g_variant_builder_add(&builder, "{sv}",
14+ SIGNON_SESSION_DATA_UI_POLICY,
15+ g_variant_new_int32(SIGNON_POLICY_DEFAULT)); // LCOV_EXCL_LINE
16+ }
17+ else
18+ {
19+ g_variant_builder_add(&builder, "{sv}",
20+ SIGNON_SESSION_DATA_UI_POLICY,
21+ g_variant_new_int32(SIGNON_POLICY_NO_USER_INTERACTION));
22+ }
23+
24 info->auth_params.reset(
25- g_variant_ref_sink(ag_auth_data_get_login_parameters(auth_data.get(), nullptr)), free_variant);
26+ g_variant_ref_sink(ag_auth_data_get_login_parameters(auth_data.get(), g_variant_builder_end(&builder))), free_variant);
27
28 // Start signon process
29 signon_auth_session_process_async(info->session.get(),

Subscribers

People subscribed via source and target branches

to all changes: