Browse files

Bug 882363 - Only enable Facebook functionality if the app id is part…

… of the partner customization.
  • Loading branch information...
1 parent 6e09b71 commit 9c92271c62ef02189501cd3388263c927c5f428e @arcturus arcturus committed with timdream Jun 13, 2013
View
2 .gitignore
@@ -15,6 +15,8 @@ manifest.appcache
/test_apps/test-agent/test/config.json
/apps/dialer/contacts
/apps/browser/js/init.json
+/apps/communications/contacts/config.json
+/apps/communications/contacts/oauth2/js/parameters.js
/apps/*/test/unit/_sandbox.html
/apps/*/test/unit/_proxy.html
View
2 Makefile
@@ -638,7 +638,7 @@ lint:
@# cubevid
@# crystalskull
@# towerjelly
- @gjslint --nojsdoc -r apps -e 'homescreen/everything.me,sms/js/ext,pdfjs/content,pdfjs/test,email/js/ext,music/js/ext,calendar/js/ext' -x 'calendar/js/presets.js,homescreen/js/hiddenapps.js,settings/js/hiddenapps.js'
+ @gjslint --nojsdoc -r apps -e 'homescreen/everything.me,sms/js/ext,pdfjs/content,pdfjs/test,email/js/ext,music/js/ext,calendar/js/ext' -x 'calendar/js/presets.js,homescreen/js/hiddenapps.js,settings/js/hiddenapps.js,communications/contacts/config.json,communications/contacts/oauth2/js/parameters.js'
@gjslint --nojsdoc -r shared/js -e 'phoneNumberJS'
# Erase all the indexedDB databases on the phone, so apps have to rebuild them.
View
8 apps/communications/contacts/config.json
@@ -1,8 +0,0 @@
-{
- "defaultContactsOrder": "givenName",
- "facebookEnabled": true,
- "operationsTimeout": 25000,
- "logLevel": "DEBUG",
- "facebookSyncPeriod": 24,
- "testToken": ""
-}
View
53 apps/communications/contacts/oauth2/js/parameters.js
@@ -1,53 +0,0 @@
-var oauthflow = this.oauthflow || {};
-
-oauthflow.params = {
-
- facebook: {
- appOrigin:
- 'app://communications.gaiamobile.org',
- redirectURI:
- 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/flow.html',
- loginPage:
- 'https://m.facebook.com/dialog/oauth/?',
- applicationId:
- '323630664378726',
- scope:
- ['friends_about_me', 'friends_birthday', 'friends_hometown',
- 'friends_location', 'friends_work_history', 'read_stream'],
- redirectMsg:
- 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/dialogs_end.html',
- redirectLogout:
- 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/logout.json'
- },
-
- live: {
- appOrigin:
- 'app://communications.gaiamobile.org',
- redirectURI:
- 'https://serene-cove-3587.herokuapp.com/liveowd/oauth2_new/flow_live.html',
- loginPage:
- 'https://login.live.com/oauth20_authorize.srf?',
- applicationId:
- '00000000480EABC6',
- scope:
- ['wl.basic', 'wl.contacts_emails', 'wl.contacts_phone_numbers',
- 'wl.contacts_birthday', 'wl.contacts_postal_addresses'],
- logoutUrl:
- 'https://login.live.com/logout.srf'
- },
-
- gmail: {
- appOrigin:
- 'app://communications.gaiamobile.org',
- redirectURI:
- 'https://serene-cove-3587.herokuapp.com/liveowd/oauth2_new/flow_live.html',
- loginPage:
- 'https://accounts.google.com/o/oauth2/auth?',
- applicationId:
- '664741361278.apps.googleusercontent.com',
- scope:
- ['https://www.google.com/m8/feeds/'],
- logoutUrl:
- 'https://accounts.google.com/Logout'
- }
-};
View
68 build/applications-data.js
@@ -335,3 +335,71 @@ content = {
};
writeContent(init, 'Calendar.Presets = ' + getDistributionFileContent('calendar', content) + ';');
+
+// Communications config
+init = getFile(GAIA_DIR, 'apps', 'communications', 'contacts', 'config.json');
+content = {
+ 'defaultContactsOrder': 'givenName',
+ 'facebookEnabled': true,
+ 'operationsTimeout': 25000,
+ 'logLevel': 'DEBUG',
+ 'facebookSyncPeriod': 24,
+ 'testToken': ''
+};
+writeContent(init, getDistributionFileContent('communications', content));
+
+// Communications External Services
+init = getFile(GAIA_DIR, 'apps', 'communications', 'contacts', 'oauth2', 'js', 'parameters.js');
+content = {
+ facebook: {
+ appOrigin:
+ 'app://communications.gaiamobile.org',
+ redirectURI:
+ 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/flow.html',
+ loginPage:
+ 'https://m.facebook.com/dialog/oauth/?',
+ applicationId:
+ '',
+ scope:
+ ['friends_about_me', 'friends_birthday', 'friends_hometown',
+ 'friends_location', 'friends_work_history', 'read_stream'],
+ redirectMsg:
+ 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/dialogs_end.html',
+ redirectLogout:
+ 'http://intense-tundra-4122.herokuapp.com/fbowd/oauth2_new/logout.json'
+ },
+
+ live: {
+ appOrigin:
+ 'app://communications.gaiamobile.org',
+ redirectURI:
+ 'https://serene-cove-3587.herokuapp.com/liveowd/oauth2_new/flow_live.html',
+ loginPage:
+ 'https://login.live.com/oauth20_authorize.srf?',
+ applicationId:
+ '00000000480EABC6',
+ scope:
+ ['wl.basic', 'wl.contacts_emails', 'wl.contacts_phone_numbers',
+ 'wl.contacts_birthday', 'wl.contacts_postal_addresses'],
+ logoutUrl:
+ 'https://login.live.com/logout.srf'
+ },
+
+ gmail: {
+ appOrigin:
+ 'app://communications.gaiamobile.org',
+ redirectURI:
+ 'https://serene-cove-3587.herokuapp.com/liveowd/oauth2_new/flow_live.html',
+ loginPage:
+ 'https://accounts.google.com/o/oauth2/auth?',
+ applicationId:
+ '664741361278.apps.googleusercontent.com',
+ scope:
+ ['https://www.google.com/m8/feeds/'],
+ logoutUrl:
+ 'https://accounts.google.com/Logout'
+ }
+};
+
+writeContent(init, 'var oauthflow = this.oauthflow || {}; oauthflow.params = ' +
+ getDistributionFileContent('communications_services', content) + ';');

0 comments on commit 9c92271

Please sign in to comment.