forked from AlexTr/Rocket.Chat.Orig
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
127 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
config = | ||
serverURL: '' | ||
authorizePath: '/m/oauth2/auth/' | ||
tokenPath: '/m/oauth2/token/' | ||
identityPath: '/m/oauth2/api/me/' | ||
addAutopublishFields: | ||
forLoggedInUser: ['services.dolphin'] | ||
forOtherUsers: ['services.dolphin.name'] | ||
|
||
Dolphin = new CustomOAuth 'dolphin', config | ||
|
||
if Meteor.isServer | ||
Meteor.startup -> | ||
RocketChat.models.Settings.find({ _id: 'API_Dolphin_URL' }).observe | ||
added: (record) -> | ||
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL' | ||
Dolphin.configure config | ||
changed: (record) -> | ||
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL' | ||
Dolphin.configure config | ||
else | ||
Meteor.startup -> | ||
Tracker.autorun -> | ||
if RocketChat.settings.get 'API_Dolphin_URL' | ||
config.serverURL = RocketChat.settings.get 'API_Dolphin_URL' | ||
Dolphin.configure config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "Dolphin URL", | ||
"Accounts_OAuth_Dolphin" : "Dolphin Login", | ||
"Accounts_OAuth_Dolphin_id" : "Dolphin Key", | ||
"Accounts_OAuth_Dolphin_secret" : "Dolphin Secret" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "Dolphin URL", | ||
"Accounts_OAuth_Dolphin" : "Dolphin Login", | ||
"Accounts_OAuth_Dolphin_id" : "Dolphin Key", | ||
"Accounts_OAuth_Dolphin_secret" : "Dolphin Secret" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "Dolphin URL", | ||
"Accounts_OAuth_Dolphin" : "Dolphin-kirjautuminen", | ||
"Accounts_OAuth_Dolphin_id" : "Dolphin Key", | ||
"Accounts_OAuth_Dolphin_secret" : "Dolphin Secret" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "Dolphin URL", | ||
"Accounts_OAuth_Dolphin" : "Dolphin 로그인", | ||
"Accounts_OAuth_Dolphin_id" : "Dolphin Key", | ||
"Accounts_OAuth_Dolphin_secret" : "Dolphin 암호" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "URL Dolphin", | ||
"Accounts_OAuth_Dolphin" : "Autentificare Dolphin", | ||
"Accounts_OAuth_Dolphin_id" : " Key Dolphin", | ||
"Accounts_OAuth_Dolphin_secret" : "Secret Dolphin" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"API_Dolphin_URL" : "Адрес Dolphin сайта", | ||
"Accounts_OAuth_Dolphin" : "Dolphin Соединение", | ||
"Accounts_OAuth_Dolphin_id" : "Dolphin Key", | ||
"Accounts_OAuth_Dolphin_secret" : "Dolphin Secret" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Package.describe({ | ||
name: 'rocketchat:dolphin', | ||
version: '0.0.1', | ||
summary: 'RocketChat settings for Dolphin Oauth' | ||
}); | ||
|
||
Package.onUse(function(api) { | ||
api.versionsFrom('1.0'); | ||
api.use('coffeescript'); | ||
api.use('rocketchat:lib@0.0.1'); | ||
api.use('rocketchat:custom-oauth'); | ||
api.addFiles("common.coffee"); | ||
api.addFiles('login-button.css', 'client'); | ||
api.addFiles('startup.coffee', 'server'); | ||
|
||
// TAPi18n | ||
api.use('templating', 'client'); | ||
var _ = Npm.require('underscore'); | ||
var fs = Npm.require('fs'); | ||
tapi18nFiles = _.compact(_.map(fs.readdirSync('packages/rocketchat-dolphin/i18n'), function(filename) { | ||
if (fs.statSync('packages/rocketchat-dolphin/i18n/' + filename).size > 16) { | ||
return 'i18n/' + filename; | ||
} | ||
})); | ||
api.use('tap:i18n@1.6.1', ['client', 'server']); | ||
api.imply('tap:i18n'); | ||
api.addFiles(tapi18nFiles, ['client', 'server']); | ||
}); | ||
|
||
Package.onTest(function(api) { | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
RocketChat.settings.add 'API_Dolphin_URL', '', { type: 'string', group: 'Accounts', public: true, section: 'Dolphin' } | ||
RocketChat.settings.add 'Accounts_OAuth_Dolphin', false, { type: 'boolean', group: 'Accounts', section: 'Dolphin' } | ||
RocketChat.settings.add 'Accounts_OAuth_Dolphin_id', '', { type: 'string', group: 'Accounts', section: 'Dolphin' } | ||
RocketChat.settings.add 'Accounts_OAuth_Dolphin_secret', '', { type: 'string', group: 'Accounts', section: 'Dolphin' } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters