Merge lp:~marcustomlinson/unity-scopes-api/fix_acl-rtm into lp:unity-scopes-api/rtm-14.09

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 267
Merged at revision: 267
Proposed branch: lp:~marcustomlinson/unity-scopes-api/fix_acl-rtm
Merge into: lp:unity-scopes-api/rtm-14.09
Diff against target: 53 lines (+6/-0)
2 files modified
src/scopes/internal/OnlineAccountClientImpl.cpp (+2/-0)
test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp (+4/-0)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-api/fix_acl-rtm
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+247570@code.launchpad.net

Commit message

Embed scope ID into the OA details of a log-in item

Description of the change

Embed scope ID into the OA details of a log-in item (cherry picked from vivid)

To post a comment you must log in.

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-11 09:00:12 +0000
3+++ src/scopes/internal/OnlineAccountClientImpl.cpp 2015-01-26 11:42:05 +0000
4@@ -447,6 +447,7 @@
5 }
6
7 VariantMap account_details_map;
8+ account_details_map["scope_id"] = query.scope_id();
9 account_details_map["service_name"] = service_name_;
10 account_details_map["service_type"] = service_type_;
11 account_details_map["provider_name"] = provider_name_;
12@@ -461,6 +462,7 @@
13 OnlineAccountClient::PostLoginAction login_failed_action)
14 {
15 VariantMap account_details_map;
16+ account_details_map["scope_id"] = "";
17 account_details_map["service_name"] = service_name_;
18 account_details_map["service_type"] = service_type_;
19 account_details_map["provider_name"] = provider_name_;
20
21=== modified file 'test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp'
22--- test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp 2014-12-11 09:00:12 +0000
23+++ test/gtest/scopes/OnlineAccountClient/OnlineAccountClient_test.cpp 2015-01-26 11:42:05 +0000
24@@ -313,12 +313,14 @@
25
26 VariantMap details = result.value("online_account_details").get_dict();
27
28+ EXPECT_NE(details.end(), details.find("scope_id"));
29 EXPECT_NE(details.end(), details.find("service_name"));
30 EXPECT_NE(details.end(), details.find("service_type"));
31 EXPECT_NE(details.end(), details.find("provider_name"));
32 EXPECT_NE(details.end(), details.find("login_passed_action"));
33 EXPECT_NE(details.end(), details.find("login_failed_action"));
34
35+ EXPECT_EQ("test", details.at("scope_id").get_string());
36 EXPECT_EQ("test_service_name", details.at("service_name").get_string());
37 EXPECT_EQ("test_service_type", details.at("service_type").get_string());
38 EXPECT_EQ("test_provider", details.at("provider_name").get_string());
39@@ -340,12 +342,14 @@
40
41 VariantMap details = values.at("online_account_details").get_dict();
42
43+ EXPECT_NE(details.end(), details.find("scope_id"));
44 EXPECT_NE(details.end(), details.find("service_name"));
45 EXPECT_NE(details.end(), details.find("service_type"));
46 EXPECT_NE(details.end(), details.find("provider_name"));
47 EXPECT_NE(details.end(), details.find("login_passed_action"));
48 EXPECT_NE(details.end(), details.find("login_failed_action"));
49
50+ EXPECT_EQ("", details.at("scope_id").get_string());
51 EXPECT_EQ("test_service_name", details.at("service_name").get_string());
52 EXPECT_EQ("test_service_type", details.at("service_type").get_string());
53 EXPECT_EQ("test_provider", details.at("provider_name").get_string());

Subscribers

People subscribed via source and target branches

to all changes: