parent
bedddfab25
commit
414cf279cb
@ -0,0 +1,24 @@ |
||||
config = |
||||
serverURL: 'http://faushouse.vm' |
||||
identityPath: '/api/v3/user' |
||||
addAutopublishFields: |
||||
forLoggedInUser: ['services.github-enterprise'] |
||||
forOtherUsers: ['services.github-enterprise.username'] |
||||
|
||||
GitHubEnterprise = new CustomOAuth 'github-enterprise', config |
||||
|
||||
if Meteor.isServer |
||||
Meteor.startup -> |
||||
RocketChat.models.Settings.find({ _id: 'API_GitHub_Enterprise_URL' }).observe |
||||
added: (record) -> |
||||
config.serverURL = RocketChat.settings.get 'API_GitHub_Enterprise_URL' |
||||
GitHubEnterprise.configure config |
||||
changed: (record) -> |
||||
config.serverURL = RocketChat.settings.get 'API_GitHub_Enterprise_URL' |
||||
GitHubEnterprise.configure config |
||||
else |
||||
Meteor.startup -> |
||||
Tracker.autorun -> |
||||
if RocketChat.settings.get 'API_GitHub_Enterprise_URL' |
||||
config.serverURL = RocketChat.settings.get 'API_GitHub_Enterprise_URL' |
||||
GitHubEnterprise.configure config |
||||
@ -0,0 +1,3 @@ |
||||
#login-buttons-image-github-enterprise { |
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJGBYxHYxl31wAAAHpSURBVDjLpZI/aFNRFMZ/973bJqGRPopV4qNq/+SpTYnWRhCKilShg9BGcHOM+GfQoZuLk4iLgw4qZNBaHLuIdBNHl7Ta1qdNFI3SihnaNG1MpH3vuiQYQnwZvHCG893zffc751z4z6PX5T5gA1DAKnAaOAQEgAfAVeCpl+CeCrlRuEC6maO4h0A1wl4tPAHMqNUthvrDdHYY7A3t4rDVjeO6rBU2FaABM1WCrBNoi48Mi+nH9yj+KtPibAKwJXfQ5vcRG7soUnYmWEuQgAEIYBv4cGpoILI0Z4tyYYPegS6UguyijZQ6J45GSNmZHzUcJYD2ii2Ajv7efZ8WZ6ZwXFj79hXpayW4O0SL1Nl/8jzZlZ9dQLFS70pgvZKIyGD0yvu5eRmMnrk1PjI81ir1qBACTdPevXj95mVuNX8XKDQc/+T334bZZ104cvzYw2s3J3qAL5WXSsDbf61NNMBu+wOBs+VSyQ84Nfhg028ZGx3/qyy0lC7lgi7lghBitoon03lvB8l0/k7Wnk+8mny0cyXzEcfZxgwfZPTyRMHsOzAFXE9YhtNQIJnOx4FpJXT1eSkn2g0frqMoFrfoCXcqlCOAGwnLuO/l4JymcWl5uRxzXUKghBAiZ5r+WaV4lrCM555zqO+x2d0ftGmpiA/0k70AAAAASUVORK5CYII=); |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,3 @@ |
||||
{ |
||||
"API_GitHub_Enterprise_URL" : "GitHub Enterprise" |
||||
} |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1 @@ |
||||
{ } |
||||
@ -0,0 +1,38 @@ |
||||
Package.describe({ |
||||
name: 'rocketchat:github-enterprise', |
||||
version: '0.0.1', |
||||
summary: 'RocketChat settings for GitHub Enterprise Oauth Flow' |
||||
}); |
||||
|
||||
// Loads all i18n.json files into tapi18nFiles
|
||||
var _ = Npm.require('underscore'); |
||||
var fs = Npm.require('fs'); |
||||
tapi18nFiles = fs.readdirSync('packages/rocketchat-github-enterprise/i18n').forEach(function(filename) { |
||||
if (fs.statSync('packages/rocketchat-github-enterprise/i18n/' + filename).size > 16) { |
||||
return 'i18n/' + filename; |
||||
} |
||||
}); |
||||
|
||||
Package.onUse(function(api) { |
||||
api.versionsFrom('1.0'); |
||||
|
||||
api.use("tap:i18n@1.5.1"); |
||||
api.use('coffeescript'); |
||||
api.use('rocketchat:lib@0.0.1'); |
||||
api.use('rocketchat:custom-oauth'); |
||||
|
||||
api.use('templating', 'client'); |
||||
|
||||
|
||||
api.addFiles("package-tap.i18n"); |
||||
api.addFiles("common.coffee"); |
||||
api.addFiles(tapi18nFiles); |
||||
|
||||
api.addFiles('github-enterprise-login-button.css', 'client'); |
||||
|
||||
api.addFiles('startup.coffee', 'server'); |
||||
}); |
||||
|
||||
Package.onTest(function(api) { |
||||
|
||||
}); |
||||
@ -0,0 +1 @@ |
||||
RocketChat.settings.add 'API_GitHub_Enterprise_URL', '', { type: 'string', group: 'API', public: true, i18nLabel: 'rocketchat-github-enterprise:API_GitHub_Enterprise_URL' } |
||||
@ -1,3 +1,3 @@ |
||||
#login-buttons-image-gitlab { |
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJGBYxHYxl31wAAAHpSURBVDjLpZI/aFNRFMZ/973bJqGRPopV4qNq/+SpTYnWRhCKilShg9BGcHOM+GfQoZuLk4iLgw4qZNBaHLuIdBNHl7Ta1qdNFI3SihnaNG1MpH3vuiQYQnwZvHCG893zffc751z4z6PX5T5gA1DAKnAaOAQEgAfAVeCpl+CeCrlRuEC6maO4h0A1wl4tPAHMqNUthvrDdHYY7A3t4rDVjeO6rBU2FaABM1WCrBNoi48Mi+nH9yj+KtPibAKwJXfQ5vcRG7soUnYmWEuQgAEIYBv4cGpoILI0Z4tyYYPegS6UguyijZQ6J45GSNmZHzUcJYD2ii2Ajv7efZ8WZ6ZwXFj79hXpayW4O0SL1Nl/8jzZlZ9dQLFS70pgvZKIyGD0yvu5eRmMnrk1PjI81ir1qBACTdPevXj95mVuNX8XKDQc/+T334bZZ104cvzYw2s3J3qAL5WXSsDbf61NNMBu+wOBs+VSyQ84Nfhg028ZGx3/qyy0lC7lgi7lghBitoon03lvB8l0/k7Wnk+8mny0cyXzEcfZxgwfZPTyRMHsOzAFXE9YhtNQIJnOx4FpJXT1eSkn2g0frqMoFrfoCXcqlCOAGwnLuO/l4JymcWl5uRxzXUKghBAiZ5r+WaV4lrCM555zqO+x2d0ftGmpiA/0k70AAAAASUVORK5CYII=); |
||||
} |
||||
} |
||||
|
||||
Loading…
Reference in new issue