Merge develop into rocketlets

pull/9666/head
Bradley Hilton 8 years ago
commit e2fc3e11d1
No known key found for this signature in database
GPG Key ID: 0666B2C24C43C358
  1. 20
      .docker/Dockerfile.local
  2. 44
      .drone.yml
  3. 1
      .drone.yml.sig
  4. 13
      .github/bot-config.yml
  5. 18
      .meteor/versions
  6. 22578
      package-lock.json
  7. 63
      package.json
  8. 2
      packages/autoupdate/autoupdate_server.js
  9. 3
      packages/autoupdate/package.js
  10. 1
      packages/meteor-accounts-saml/.npm/package/.gitignore
  11. 7
      packages/meteor-accounts-saml/.npm/package/README
  12. 115
      packages/meteor-accounts-saml/.npm/package/npm-shrinkwrap.json
  13. 9
      packages/meteor-accounts-saml/package.js
  14. 4
      packages/meteor-accounts-saml/saml_server.js
  15. 14
      packages/meteor-accounts-saml/saml_utils.js
  16. 1
      packages/rocketchat-2fa/.npm/package/.gitignore
  17. 7
      packages/rocketchat-2fa/.npm/package/README
  18. 20
      packages/rocketchat-2fa/.npm/package/npm-shrinkwrap.json
  19. 21
      packages/rocketchat-2fa/client/accountSecurity.html
  20. 10
      packages/rocketchat-2fa/client/accountSecurity.js
  21. 5
      packages/rocketchat-2fa/package.js
  22. 1
      packages/rocketchat-api/.npm/package/.gitignore
  23. 7
      packages/rocketchat-api/.npm/package/README
  24. 45
      packages/rocketchat-api/.npm/package/npm-shrinkwrap.json
  25. 4
      packages/rocketchat-api/package.js
  26. 3
      packages/rocketchat-api/server/v1/rooms.js
  27. 2
      packages/rocketchat-api/server/v1/users.js
  28. 1
      packages/rocketchat-assets/.npm/package/.gitignore
  29. 7
      packages/rocketchat-assets/.npm/package/README
  30. 10
      packages/rocketchat-assets/.npm/package/npm-shrinkwrap.json
  31. 4
      packages/rocketchat-assets/package.js
  32. 1
      packages/rocketchat-authorization/server/startup.js
  33. 1
      packages/rocketchat-autolinker/.npm/package/.gitignore
  34. 7
      packages/rocketchat-autolinker/.npm/package/README
  35. 10
      packages/rocketchat-autolinker/.npm/package/npm-shrinkwrap.json
  36. 4
      packages/rocketchat-autolinker/package.js
  37. 1
      packages/rocketchat-cas/.npm/package/.gitignore
  38. 7
      packages/rocketchat-cas/.npm/package/README
  39. 113
      packages/rocketchat-cas/.npm/package/npm-shrinkwrap.json
  40. 4
      packages/rocketchat-cas/package.js
  41. 6
      packages/rocketchat-cas/server/cas_server.js
  42. 10
      packages/rocketchat-channel-settings-mail-messages/client/views/channelSettingsMailMessages.html
  43. 11
      packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.html
  44. 2
      packages/rocketchat-channel-settings/client/startup/messageTypes.js
  45. 10
      packages/rocketchat-channel-settings/client/startup/tabBar.js
  46. 332
      packages/rocketchat-channel-settings/client/views/channelSettings.html
  47. 643
      packages/rocketchat-channel-settings/client/views/channelSettings.js
  48. 59
      packages/rocketchat-channel-settings/server/methods/saveRoomSettings.js
  49. 1
      packages/rocketchat-crowd/.npm/package/.gitignore
  50. 7
      packages/rocketchat-crowd/.npm/package/README
  51. 10
      packages/rocketchat-crowd/.npm/package/npm-shrinkwrap.json
  52. 4
      packages/rocketchat-crowd/package.js
  53. 3
      packages/rocketchat-crowd/server/crowd.js
  54. 7
      packages/rocketchat-custom-sounds/client/admin/adminSounds.html
  55. 9
      packages/rocketchat-emoji-custom/admin/adminEmoji.html
  56. 2
      packages/rocketchat-emoji-emojione/generateEmojiIndex.js
  57. 16
      packages/rocketchat-emoji/client/emojiPicker.html
  58. 7
      packages/rocketchat-emoji/client/emojiPicker.js
  59. 4
      packages/rocketchat-emoji/client/lib/EmojiPicker.js
  60. 1
      packages/rocketchat-file-upload/.npm/package/.gitignore
  61. 7
      packages/rocketchat-file-upload/.npm/package/README
  62. 10
      packages/rocketchat-file-upload/.npm/package/npm-shrinkwrap.json
  63. 4
      packages/rocketchat-file-upload/package.js
  64. 1
      packages/rocketchat-file/.npm/package/.gitignore
  65. 7
      packages/rocketchat-file/.npm/package/README
  66. 80
      packages/rocketchat-file/.npm/package/npm-shrinkwrap.json
  67. 6
      packages/rocketchat-file/package.js
  68. 1548
      packages/rocketchat-google-natural-language/.npm/package/npm-shrinkwrap.json
  69. 4
      packages/rocketchat-google-natural-language/package.js
  70. 3
      packages/rocketchat-google-natural-language/server/index.js
  71. 1
      packages/rocketchat-google-vision/.npm/package/.gitignore
  72. 7
      packages/rocketchat-google-vision/.npm/package/README
  73. 1487
      packages/rocketchat-google-vision/.npm/package/npm-shrinkwrap.json
  74. 5
      packages/rocketchat-google-vision/package.js
  75. 4
      packages/rocketchat-google-vision/server/googlevision.js
  76. 2
      packages/rocketchat-i18n/i18n/de.i18n.json
  77. 18
      packages/rocketchat-i18n/i18n/en.i18n.json
  78. 2
      packages/rocketchat-i18n/i18n/pt-BR.i18n.json
  79. 2
      packages/rocketchat-i18n/i18n/pt.i18n.json
  80. 1
      packages/rocketchat-importer-csv/.npm/package/.gitignore
  81. 7
      packages/rocketchat-importer-csv/.npm/package/README
  82. 10
      packages/rocketchat-importer-csv/.npm/package/npm-shrinkwrap.json
  83. 4
      packages/rocketchat-importer-csv/package.js
  84. 2
      packages/rocketchat-importer-csv/server/importer.js
  85. 1
      packages/rocketchat-importer-hipchat-enterprise/.npm/package/.gitignore
  86. 7
      packages/rocketchat-importer-hipchat-enterprise/.npm/package/README
  87. 82
      packages/rocketchat-importer-hipchat-enterprise/.npm/package/npm-shrinkwrap.json
  88. 4
      packages/rocketchat-importer-hipchat-enterprise/package.js
  89. 8
      packages/rocketchat-importer-hipchat-enterprise/server/importer.js
  90. 1
      packages/rocketchat-importer-slack-users/.npm/package/.gitignore
  91. 7
      packages/rocketchat-importer-slack-users/.npm/package/README
  92. 10
      packages/rocketchat-importer-slack-users/.npm/package/npm-shrinkwrap.json
  93. 4
      packages/rocketchat-importer-slack-users/package.js
  94. 2
      packages/rocketchat-importer-slack-users/server/importer.js
  95. 1
      packages/rocketchat-importer/.npm/package/.gitignore
  96. 7
      packages/rocketchat-importer/.npm/package/README
  97. 15
      packages/rocketchat-importer/.npm/package/npm-shrinkwrap.json
  98. 7
      packages/rocketchat-importer/client/admin/adminImport.html
  99. 7
      packages/rocketchat-importer/client/admin/adminImportPrepare.html
  100. 5
      packages/rocketchat-importer/package.js
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,20 @@
FROM node:8
ADD . /app
ENV RC_VERSION=0.57.0-designpreview \
DEPLOY_METHOD=docker \
NODE_ENV=production \
PORT=3000 \
ROOT_URL=http://localhost:3000
RUN set -x \
&& cd /app/bundle/programs/server \
&& npm install \
&& npm cache clear --force
WORKDIR /app/bundle
EXPOSE 3000
CMD ["node", "main.js"]

@ -0,0 +1,44 @@
pipeline:
restore-cache:
image: drillster/drone-volume-cache
restore: true
mount:
- /drone/.meteor/
- ./node_modules
- ./.meteor/local
volumes:
- /tmp/cache/Rocket.Chat:/cache
build:
image: ubuntu:16.04
environment:
- METEOR_ALLOW_SUPERUSER=true
commands:
- apt update && apt install curl git python g++ build-essential bzip2 -y
- export HOME=/drone
- export PATH="/drone/.meteor:$PATH"
- if [ ! -e "/drone/.meteor/meteor" ]; then export HOME=/drone; curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi
- which meteor
- meteor npm install
- set +e
- meteor add rocketchat:lib
- set -e
- mkdir /drone/build
- meteor build --allow-superuser --server-only --directory /drone/build
- cp .docker/Dockerfile.local /drone/build/Dockerfile
rebuild-cache:
image: drillster/drone-volume-cache
rebuild: true
mount:
- /drone/.meteor/
- ./node_modules
- ./.meteor/local
volumes:
- /tmp/cache/Rocket.Chat:/cache
docker:
image: plugins/docker
repo: rocketchat/rocket.chat
dockerfile: /drone/build/Dockerfile
storage_driver: overlay
context: /drone/build
secrets: [ docker_username, docker_password ]
tag: designpreview

@ -0,0 +1 @@
eyJhbGciOiJIUzI1NiJ9.cGlwZWxpbmU6CiAgcmVzdG9yZS1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZXN0b3JlOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvLm1ldGVvci8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGJ1aWxkOgogICAgaW1hZ2U6IHVidW50dToxNi4wNAogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gTUVURU9SX0FMTE9XX1NVUEVSVVNFUj10cnVlCiAgICBjb21tYW5kczoKICAgICAgLSBhcHQgdXBkYXRlICYmIGFwdCBpbnN0YWxsIGN1cmwgZ2l0IHB5dGhvbiBnKysgYnVpbGQtZXNzZW50aWFsIGJ6aXAyIC15CiAgICAgIC0gZXhwb3J0IEhPTUU9L2Ryb25lCiAgICAgIC0gZXhwb3J0IFBBVEg9Ii9kcm9uZS8ubWV0ZW9yOiRQQVRIIgogICAgICAtIGlmIFsgISAtZSAiL2Ryb25lLy5tZXRlb3IvbWV0ZW9yIiBdOyB0aGVuIGV4cG9ydCBIT01FPS9kcm9uZTsgY3VybCBodHRwczovL2luc3RhbGwubWV0ZW9yLmNvbSB8IHNlZCBzLy0tcHJvZ3Jlc3MtYmFyLy1zTC9nIHwgL2Jpbi9zaDsgZmkKICAgICAgLSB3aGljaCBtZXRlb3IKICAgICAgLSBtZXRlb3IgbnBtIGluc3RhbGwKICAgICAgLSBzZXQgK2UKICAgICAgLSBtZXRlb3IgYWRkIHJvY2tldGNoYXQ6bGliCiAgICAgIC0gc2V0IC1lCiAgICAgIC0gbWtkaXIgL2Ryb25lL2J1aWxkCiAgICAgIC0gbWV0ZW9yIGJ1aWxkIC0tYWxsb3ctc3VwZXJ1c2VyIC0tc2VydmVyLW9ubHkgLS1kaXJlY3RvcnkgL2Ryb25lL2J1aWxkCiAgICAgIC0gY3AgLmRvY2tlci9Eb2NrZXJmaWxlLmxvY2FsIC9kcm9uZS9idWlsZC9Eb2NrZXJmaWxlCiAgcmVidWlsZC1jYWNoZToKICAgIGltYWdlOiBkcmlsbHN0ZXIvZHJvbmUtdm9sdW1lLWNhY2hlCiAgICByZWJ1aWxkOiB0cnVlCiAgICBtb3VudDoKICAgICAgLSAvZHJvbmUvLm1ldGVvci8KICAgICAgLSAuL25vZGVfbW9kdWxlcwogICAgICAtIC4vLm1ldGVvci9sb2NhbAogICAgdm9sdW1lczoKICAgICAgLSAvdG1wL2NhY2hlL1JvY2tldC5DaGF0Oi9jYWNoZQogIGRvY2tlcjoKICAgIGltYWdlOiBwbHVnaW5zL2RvY2tlcgogICAgcmVwbzogcm9ja2V0Y2hhdC9yb2NrZXQuY2hhdAogICAgZG9ja2VyZmlsZTogL2Ryb25lL2J1aWxkL0RvY2tlcmZpbGUKICAgIHN0b3JhZ2VfZHJpdmVyOiBvdmVybGF5CiAgICBjb250ZXh0OiAvZHJvbmUvYnVpbGQKICAgIHNlY3JldHM6IFsgZG9ja2VyX3VzZXJuYW1lLCBkb2NrZXJfcGFzc3dvcmQgXQogICAgdGFnOiBkZXNpZ25wcmV2aWV3Cg.vIwnazoqiKfxsC6hQHJFmB7jE0dvewf69xJgNxUWNic

@ -0,0 +1,13 @@
bot:
name: "@rocket-cat"
whitelist:
users:
- TwizzyDizzy
- theorenck
labels:
- duplicate
- enhancement
- "help wanted"
- invalid
- question
- wontfix

@ -1,11 +1,11 @@
accounts-base@1.4.0
accounts-facebook@1.3.0
accounts-github@1.4.0
accounts-google@1.3.0
accounts-meteor-developer@1.4.0
accounts-base@1.4.2
accounts-facebook@1.3.1
accounts-github@1.4.1
accounts-google@1.3.1
accounts-meteor-developer@1.4.1
accounts-oauth@1.1.15
accounts-password@1.5.0
accounts-twitter@1.4.0
accounts-twitter@1.4.1
aldeed:simple-schema@1.5.3
allow-deny@1.1.0
autoupdate@1.3.12
@ -103,16 +103,16 @@ nimble:restivus@0.8.12
nooitaf:colors@1.1.2_1
npm-bcrypt@0.9.3
npm-mongo@2.2.33
oauth@1.2.0
oauth@1.2.1
oauth1@1.2.0
oauth2@1.2.0
observe-sequence@1.0.16
ordered-dict@1.0.9
ostrio:cookies@2.2.4
pauli:accounts-linkedin@2.1.3
pauli:accounts-linkedin@2.1.5
pauli:linkedin-oauth@1.2.0
percolate:synced-cron@1.3.2
promise@0.10.0
promise@0.10.1
raix:eventemitter@0.1.3
raix:eventstate@0.0.4
raix:handlebar-helpers@0.2.5

22578
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -86,13 +86,13 @@
"email": "support@rocket.chat"
},
"devDependencies": {
"autoprefixer": "^7.2.3",
"autoprefixer": "^7.2.5",
"babel-mocha-es6-compiler": "^0.1.0",
"babel-plugin-array-includes": "^2.0.3",
"chimp": "^0.50.2",
"chimp": "^0.51.0",
"conventional-changelog-cli": "^1.3.5",
"eslint": "^4.13.1",
"mock-require": "^2.0.2",
"eslint": "^4.15.0",
"mock-require": "^3.0.1",
"postcss-custom-properties": "^6.2.0",
"postcss-import": "^11.0.0",
"postcss-media-minmax": "^3.0.0",
@ -105,31 +105,74 @@
"supertest": "^3.0.0"
},
"dependencies": {
"@google-cloud/language": "0.8.0",
"@google-cloud/storage": "1.4.0",
"aws-sdk": "^2.172.0",
"@google-cloud/vision": "0.11.5",
"adm-zip": "0.4.7",
"atlassian-crowd": "0.5.0",
"autolinker": "1.6.0",
"aws-sdk": "^2.180.0",
"babel-runtime": "^6.26.0",
"bad-words": "1.3.1",
"bcrypt": "^1.0.3",
"bson": "0.5.5",
"bugsnag": "1.8.0",
"bunyan": "^1.8.12",
"codemirror": "^5.32.0",
"core-js": "2.5.3",
"emailreplyparser": "0.0.5",
"busboy": "0.2.14",
"cas": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62",
"clipboard": "1.7.1",
"codemirror": "^5.33.0",
"coffeescript": "1.12.7",
"connect": "2.7.10",
"core-js": "^2.5.3",
"csv-parse": "1.2.0",
"emailreplyparser": "^0.0.5",
"file-type": "^7.4.0",
"filesize": "3.5.11",
"gm": "1.23.1",
"gridfs-stream": "1.1.1",
"he": "1.1.1",
"highlight.js": "^9.12.0",
"iconv-lite": "0.4.19",
"image-size": "0.6.2",
"imap": "^0.8.19",
"ip-range-check": "0.0.2",
"jquery": "^3.2.1",
"ldapjs": "^1.0.1",
"jschardet": "1.6.0",
"ldapjs": "^1.0.2",
"less": "https://github.com/meteor/less.js/tarball/8130849eb3d7f0ecf0ca8d0af7c4207b0442e3f6",
"less-plugin-autoprefix": "1.5.1",
"localforage": "1.5.5",
"lokijs": "1.4.1",
"lru-cache": "2.6.5",
"mailparser": "^2.1.0",
"marked": "0.3.12",
"mime-db": "^1.32.0",
"mime-type": "^3.0.5",
"mkdirp": "0.5.1",
"moment": "^2.20.1",
"moment-timezone": "^0.5.14",
"node-dogstatsd": "0.0.7",
"object-path": "0.11.4",
"photoswipe": "^4.1.2",
"poplib": "^0.1.7",
"prom-client": "^10.2.2",
"querystring": "0.2.0",
"redis": "2.2.5",
"semver": "^5.4.1",
"slack-client": "2.0.6",
"speakeasy": "2.0.0",
"tar-stream": "1.5.5",
"toastr": "^2.1.4",
"twilio": "2.9.1",
"ua-parser-js": "0.7.17",
"underscore": "^1.8.3",
"underscore.string": "^3.3.4",
"wolfy87-eventemitter": "^5.2.4"
"wolfy87-eventemitter": "^5.2.4",
"xml-crypto": "0.6.0",
"xml2js": "0.2.0",
"xmlbuilder": "2.6.4",
"xmldom": "0.1.27",
"yaqrcode": "0.2.1"
}
}

@ -31,7 +31,7 @@
// version. Developers can easily experiment with different versioning and
// updating models by forking this package.
var Future = Npm.require("fibers/future");
import Future from "fibers/future";
Autoupdate = {};

@ -16,7 +16,8 @@ Package.onUse(function (api) {
api.use([
'ddp',
'mongo'
'mongo',
'ecmascript'
], ['client', 'server']);
api.use(['http', 'random'], 'web.cordova');

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,115 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"buffer-crc32": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz",
"integrity": "sha1-vj5TgvwCttYySVasGvmKqYsIU0w="
},
"bytes": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz",
"integrity": "sha1-qtM+wU49wsp06OfUUfm6BTrU96A="
},
"connect": {
"version": "2.7.10",
"resolved": "https://registry.npmjs.org/connect/-/connect-2.7.10.tgz",
"integrity": "sha1-oKxZRk1lJAedsCyXFRx5XBtN7mQ="
},
"cookie": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz",
"integrity": "sha1-+az521frdWjJ/MWWJWt7si4wfIE="
},
"cookie-signature": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz",
"integrity": "sha1-ROByFIrwHm6OJK+/EmkNaK5pjss="
},
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo="
},
"formidable": {
"version": "1.0.14",
"resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz",
"integrity": "sha1-Kz9MQRy7X91pXESEPiojUUpDIxo="
},
"fresh": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz",
"integrity": "sha1-A+SwF4Qk5MLV0ZpU2IFM3JeTSFA="
},
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
},
"mime": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.2.6.tgz",
"integrity": "sha1-sfhsdowCX6h7SAdfFwnyiuryA2U="
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
},
"pause": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
"integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10="
},
"qs": {
"version": "0.6.5",
"resolved": "https://registry.npmjs.org/qs/-/qs-0.6.5.tgz",
"integrity": "sha1-KUsmjksNQlD23eGbO4s0k13/FO8="
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
},
"range-parser": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz",
"integrity": "sha1-wEJ//vUcEKy6B4KkbJYC50T/Ygs="
},
"sax": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
},
"send": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/send/-/send-0.1.0.tgz",
"integrity": "sha1-z7COvTzsm3/Bo32f+eh1qXHPRkA="
},
"xml-crypto": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.6.0.tgz",
"integrity": "sha1-RSKeACjLPultxTP6M4DCvzuGrbg="
},
"xml2js": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.2.0.tgz",
"integrity": "sha1-99pSJ33rtkeYMFOtti2XLe5loaw="
},
"xmlbuilder": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-2.6.4.tgz",
"integrity": "sha1-gSOsFXbZxmkY9BBJbx/p8Ci4yj4="
},
"xmldom": {
"version": "0.1.19",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz",
"integrity": "sha1-Yx/Ad3bv2EEYvyUXGzftTQdaCrw="
},
"xpath.js": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.0.6.tgz",
"integrity": "sha1-/kuBwbFS69jhOVJl/txbAPyim5A="
}
}
}

@ -15,12 +15,3 @@ Package.on_use(function(api) {
api.add_files(['saml_rocketchat.js'], 'server');
api.add_files('saml_client.js', 'client');
});
Npm.depends({
'xml2js': '0.2.0',
'xml-crypto': '0.6.0',
'xmldom': '0.1.19',
'connect': '2.7.10',
'xmlbuilder': '2.6.4',
'querystring': '0.2.0'
});

@ -12,8 +12,8 @@ if (!Accounts.saml) {
};
}
const fiber = Npm.require('fibers');
const connect = Npm.require('connect');
import fiber from 'fibers';
import connect from 'connect';
RoutePolicy.declare('/_saml/', 'network');
/**

@ -1,12 +1,12 @@
/* globals SAML:true */
const zlib = Npm.require('zlib');
const xml2js = Npm.require('xml2js');
const xmlCrypto = Npm.require('xml-crypto');
const crypto = Npm.require('crypto');
const xmldom = Npm.require('xmldom');
const querystring = Npm.require('querystring');
const xmlbuilder = Npm.require('xmlbuilder');
import zlib from 'zlib';
import xml2js from 'xml2js';
import xmlCrypto from 'xml-crypto';
import crypto from 'crypto';
import xmldom from 'xmldom';
import querystring from 'querystring';
import xmlbuilder from 'xmlbuilder';
// var prefixMatch = new RegExp(/(?!xmlns)^.*:/);

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,20 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"base32.js": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.0.1.tgz",
"integrity": "sha1-0EVzalex9sE58MffQlGKhOkbsro="
},
"speakeasy": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/speakeasy/-/speakeasy-2.0.0.tgz",
"integrity": "sha1-hckaBxsJpcuGQlkNmDVmFl9XYTo="
},
"yaqrcode": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/yaqrcode/-/yaqrcode-0.2.1.tgz",
"integrity": "sha1-7xyzMgNJ9rO7MctoCjeouBS9itc="
}
}
}

@ -1,13 +1,8 @@
<template name="accountSecurity">
<section class="page-container page-home page-static">
<header class="fixed-title border-component-color">
{{> burger}}
<h2>
<span class="room-title">{{_ "Security"}}</span>
</h2>
</header>
<div class="content">
<div class="rocket-form">
<section class="preferences-page">
{{> header sectionName="Security"}}
<div class="preferences-page__content">
<form id="security" autocomplete="off" class="container">
<fieldset>
<div class="section">
<h1>{{_ "Two-factor_authentication"}}</h1>
@ -30,9 +25,9 @@
<img src="{{imageData}}">
<form class="inline verify-code">
<input type="text" id="testCode" placeholder="{{_ "Enter_authentication_code"}}">
<button type="submit" class="button primary">{{_ "Verify"}}</button>
<form class="inline">
<input type="text" class="rc-input__element" id="testCode" placeholder="{{_ "Enter_authentication_code"}}">
<button class="button primary verify-code">{{_ "Verify"}}</button>
</form>
{{/unless}}
{{/if}}
@ -52,7 +47,7 @@
</div>
</fieldset>
{{/if}}
</div>
</form>
</div>
</section>
</template>

@ -29,6 +29,8 @@ Template.accountSecurity.helpers({
Template.accountSecurity.events({
'click .enable-2fa'(event, instance) {
event.preventDefault();
Meteor.call('2fa:enable', (error, result) => {
instance.imageSecret.set(result.secret);
instance.imageData.set(qrcode(result.url, { size: 200 }));
@ -41,7 +43,9 @@ Template.accountSecurity.events({
});
},
'click .disable-2fa'() {
'click .disable-2fa'(event) {
event.preventDefault();
modal.open({
title: t('Two-factor_authentication'),
text: t('Open_your_authentication_app_and_enter_the_code'),
@ -70,7 +74,7 @@ Template.accountSecurity.events({
});
},
'submit .verify-code'(event, instance) {
'click .verify-code'(event, instance) {
event.preventDefault();
Meteor.call('2fa:validateTempToken', instance.find('#testCode').value, (error, result) => {
@ -87,6 +91,8 @@ Template.accountSecurity.events({
},
'click .regenerate-codes'(event, instance) {
event.preventDefault();
modal.open({
title: t('Two-factor_authentication'),
text: t('Open_your_authentication_app_and_enter_the_code'),

@ -6,11 +6,6 @@ Package.describe({
documentation: 'README.md'
});
Npm.depends({
speakeasy: '2.0.0',
yaqrcode: '0.2.1'
});
Package.onUse(function(api) {
api.use([
'accounts-base',

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,45 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"busboy": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.13.tgz",
"integrity": "sha1-kPxPajln2BVhb8l2v6jlau0MWLY="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"dicer": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
"integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8="
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk="
},
"streamsearch": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
"integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
}

@ -42,7 +42,3 @@ Package.onUse(function(api) {
api.addFiles('server/v1/stats.js', 'server');
api.addFiles('server/v1/users.js', 'server');
});
Npm.depends({
busboy: '0.2.13'
});

@ -1,3 +1,5 @@
import Busboy from 'busboy';
RocketChat.API.v1.addRoute('rooms.get', { authRequired: true }, {
get() {
const { updatedSince } = this.queryParams;
@ -33,7 +35,6 @@ RocketChat.API.v1.addRoute('rooms.upload/:rid', { authRequired: true }, {
return RocketChat.API.v1.unauthorized();
}
const Busboy = Npm.require('busboy');
const busboy = new Busboy({ headers: this.request.headers });
const files = [];
const fields = {};

@ -1,4 +1,5 @@
import _ from 'underscore';
import Busboy from 'busboy';
RocketChat.API.v1.addRoute('users.create', { authRequired: true }, {
post() {
@ -194,7 +195,6 @@ RocketChat.API.v1.addRoute('users.setAvatar', { authRequired: true }, {
if (this.bodyParams.avatarUrl) {
RocketChat.setUserAvatar(user, this.bodyParams.avatarUrl, '', 'url');
} else {
const Busboy = Npm.require('busboy');
const busboy = new Busboy({ headers: this.request.headers });
Meteor.wrapAsync((callback) => {

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"image-size": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.4.0.tgz",
"integrity": "sha1-1LTh9hlS5MvBzqmmsMkV/stwdRA="
}
}
}

@ -16,7 +16,3 @@ Package.onUse(function(api) {
api.addFiles('server/assets.js', 'server');
});
Npm.depends({
'image-size': '0.4.0'
});

@ -40,6 +40,7 @@ Meteor.startup(function() {
{ _id: 'manage-own-integrations', roles : ['admin', 'bot'] },
{ _id: 'manage-oauth-apps', roles : ['admin'] },
{ _id: 'mention-all', roles : ['admin', 'owner', 'moderator', 'user'] },
{ _id: 'mention-here', roles : ['admin', 'owner', 'moderator', 'user'] },
{ _id: 'mute-user', roles : ['admin', 'owner', 'moderator'] },
{ _id: 'remove-user', roles : ['admin', 'owner', 'moderator'] },
{ _id: 'run-import', roles : ['admin'] },

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"autolinker": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-1.6.0.tgz",
"integrity": "sha1-utN2t62OQV8i8QL8Dzf2QOZPHL8="
}
}
}

@ -5,10 +5,6 @@ Package.describe({
git: ''
});
Npm.depends({
autolinker: '1.6.0'
});
Package.onUse(function(api) {
api.use('ecmascript');
api.use('rocketchat:lib');

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,113 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
},
"cas": {
"version": "https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62",
"integrity": "sha1-AL8m1JYV/7kMEdlJ0sKtJ18YXg4="
},
"cheerio": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.19.0.tgz",
"integrity": "sha1-dy5wFfLuKZZQltcepBdbdas1SSU="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"css-select": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-select/-/css-select-1.0.0.tgz",
"integrity": "sha1-sRIcpRhI3SZOIkTQWM7iVN7rRLA="
},
"css-what": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-1.0.0.tgz",
"integrity": "sha1-18wt9FGAZm+Z0rFEYmOUaeAPc2w="
},
"dom-serializer": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
"integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"dependencies": {
"domelementtype": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
"integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
}
}
},
"domelementtype": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.0.tgz",
"integrity": "sha1-sXrtguirWeUt2cGbF1bg/BhyBMI="
},
"domhandler": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
"integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg="
},
"domutils": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.4.3.tgz",
"integrity": "sha1-CGVRN5bGswYDGFDhdVFrr4C3Km8="
},
"entities": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz",
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA="
},
"htmlparser2": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
"integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
"dependencies": {
"domutils": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
"integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8="
},
"entities": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
}
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y="
},
"nth-check": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz",
"integrity": "sha1-mSms32KPwsQQmN6rgqxYDPFJquQ="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
}

@ -24,7 +24,3 @@ Package.onUse(function(api) {
// Client files
api.add_files('client/cas_client.js', 'client');
});
Npm.depends({
cas: 'https://github.com/kcbanner/node-cas/tarball/fcd27dad333223b3b75a048bce27973fb3ca0f62'
});

@ -2,9 +2,9 @@
/* jshint newcap: false */
import _ from 'underscore';
const fiber = Npm.require('fibers');
const url = Npm.require('url');
const CAS = Npm.require('cas');
import fiber from 'fibers';
import url from 'url';
import CAS from 'cas';
RoutePolicy.declare('/_cas/', 'network');

@ -1,10 +1,10 @@
<template name="channelSettingsMailMessages">
{{#if canSendEmail}}
<li>
<label>{{_ "Mail_Messages"}}</label>
<div>
<button type="button" class="button primary mail-messages">{{_ "Choose_messages"}}</button>
<label class="rc-user-info__label">
{{_ "Mail_Messages"}}
<div class="rc-user-info__description">
<button type="button" class="rc-button rc-button--outline rc-button--primary mail-messages">{{_ "Choose_messages"}}</button>
</div>
</li>
</label>
{{/if}}
</template>

@ -1,9 +1,6 @@
<template name="mailMessagesInstructions">
<div class="content">
<div class="list-view mail-message">
<div class="title">
<h2>{{_ "Mail_Messages"}}</h2>
</div>
<p>{{_ "Mail_Messages_Instructions"}}</p>
<form>
<fieldset>
@ -26,13 +23,13 @@
<div class="input-line double-col">
<label>{{_ "Additional_emails"}}</label>
<div>
<input type="text" name="to_emails" value="" />
<input type="text" name="to_emails" value="" class="rc-input__element"/>
</div>
</div>
<div class="input-line double-col">
<label>{{_ "Subject"}}</label>
<div>
<input type="text" name="subject" value="{{_ "Mail_Messages_Subject" roomName}}" />
<input type="text" name="subject" class="rc-input__element" value="{{_ "Mail_Messages_Subject" roomName}}" />
</div>
</div>
</fieldset>
@ -47,8 +44,8 @@
{{{_ "Mail_Message_No_messages_selected_select_all"}}}
</div>
<p style="margin-top: 30px">
<button type="button" class="button cancel">{{_ "Cancel"}}</button>
<button type="button" class="button primary send">{{_ "Send"}}</button>
<button class="rc-button rc-button--outline cancel">{{_ 'Cancel'}}</button>
<button class="rc-button rc-button--primary send">{{_ 'Send'}}</button>
</p>
</div>
</div>

@ -6,7 +6,7 @@ Meteor.startup(function() {
data(message) {
return {
user_by: message.u && message.u.username,
room_type: message.msg
room_type: t(message.msg)
};
}
});

@ -8,4 +8,14 @@ Meteor.startup(() => {
template: 'channelSettings',
order: 0
});
RocketChat.TabBar.addButton({
groups: ['channel', 'group', 'direct'],
id: 'mail-messages',
anonymous: true,
i18nTitle: 'Mail_Messages',
icon: 'mail',
template: 'mailMessagesInstructions',
order: 10
});
});

@ -1,109 +1,249 @@
<template name="channelSettings">
<div class="list-view channel-settings">
<div class="title">
<h2>{{_ "Room_Info"}}</h2>
</div>
<form>
<ul class="list clearfix">
{{#let room=getRoom}}
{{#each toArray settings}}
{{#if editing}}
{{> channelSettingsEditing}}
{{else}}
{{> channelSettingsInfo}}
{{/if}}
</template>
<template name="channelSettingsEditing">
<div class="rc-user-info__scroll">
{{#with settings.name}}
{{#if canView}}
<div class="rc-user-info__row">
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ label}}{{equal default value '*'}}</div>
<div class="rc-input__wrapper">
<input type="text" name="name" value="{{value}}" class="rc-input__element js-input" disabled="{{./disabled}}"/>
</div>
</label>
</div>
</div>
{{/if}}
{{/with}}
{{#if $value.canView room}}
{{#let value=(valueOf room $key)}}
<li class="{{$value.type}}">
<label>{{_ $value.label}}</label>
<div class="setting-block">
{{#if $eq $value.type 'text'}}
{{#if editing $key}}
{{#if $value.canEdit room}}
<input type="text" name="{{$key}}" value="{{value}}" class="content-background-color editing" />
{{/if}}
{{else}}
<span class='current-setting' data-edit="{{#if $value.canEdit room}}{{$key}}{{else}}false{{/if}}">{{value}}</span>
{{/if}}
{{/if}}
{{#with settings.topic}}
<div class="rc-user-info__row">
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ label}}{{equal default value '*'}}</div>
<div class="rc-input__wrapper">
<input type="text" name="topic" value="{{value}}" class="rc-input__element js-input" disabled="{{./disabled}}"/>
</div>
</label>
</div>
</div>
{{/with}}
{{#if $eq $value.type 'markdown'}}
{{#if editing $key}}
{{#if $value.canEdit room}}
<input type="text" name="{{$key}}" value="{{unscape value}}" class="content-background-color editing" />
{{/if}}
{{else}}
<span class='current-setting' data-edit="{{#if $value.canEdit room}}{{$key}}{{else}}false{{/if}}">{{{RocketChatMarkdown value}}}</span>
{{/if}}
{{/if}}
{{#with settings.announcement}}
<div class="rc-user-info__row">
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ label}}{{equal default value '*'}}</div>
<div class="rc-input__wrapper">
<input type="text" name="announcement" value="{{value}}" class="rc-input__element js-input" disabled="{{./disabled}}"/>
</div>
</label>
</div>
</div>
{{/with}}
{{#if $eq $value.type 'select'}}
{{#each toArray $value.options}}
<div class="input radio">
<input type="radio" id="{{$key}}" name="{{../$key}}" value="{{$key}}" checked="{{$eq value $key}}" disabled="{{isDisabled $key room}}" />
<label for="{{$key}}">{{_ $value}}</label>
</div>
{{/each}}
{{/if}}
{{#with settings.description}}
<div class="rc-user-info__row">
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ label}}{{equal default value '*'}}</div>
<div class="rc-input__wrapper">
<input type="text" name="description" value="{{value}}" class="rc-input__element js-input" disabled="{{./disabled}}"/>
</div>
</label>
</div>
</div>
{{/with}}
{{#if $eq $value.type 'boolean'}}
<div class="input checkbox toggle">
<input type="checkbox" id="{{$key}}" name="{{$key}}" value="{{value}}" checked="{{$eq value true}}" disabled="{{isDisabled $key room}}" />
<label for="{{$key}}"></label>
</div>
{{#if $value.canEdit room}}
{{#if $value.processing.get}}
{{> loading}}
{{/if}}
{{/if}}
{{/if}}
{{#with settings.t}}
<div class="rc-user-info__row rc-user-info__row--separator">
<div class="rc-switch-double">
<div class="rc-switch-double__label {{equal true value 'disabled'}}">
{{_ "Private"}}
<div class="rc-switch-double__description">
{{_ "Just_invited_people_can_access_this_channel"}}
</div>
</div>
<div class="rc-switch rc-switch--blue">
<label class="rc-switch__label">
<input type="checkbox" class="rc-switch__input js-input-check" name="t" checked="{{checked}}" disabled="{{./disabled}}">
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
</label>
</div>
<div class="rc-switch-double__label {{equal false value 'disabled'}}">
{{_ "Public"}}{{equal default value '*'}}
<div class="rc-switch-double__description">
{{_ "Everyone_can_access_this_channel"}}
</div>
</div>
{{#unless $value.isToggle}}
{{#if $value.canEdit room}}
{{#if editing $key}}
<div class="buttons secondary-background-color">
<button type="button" class="button cancel">
<i class="icon-cancel"></i>
</button>
<button type="button" class="button primary save">
<i class="icon-ok success-color"></i>
</button>
</div>
{{else}}
{{#if $value.showHideValue room}}
<button type="button" class="button show">
<i class="{{#if showingValue $key}}icon-eye-off{{else}}icon-eye{{/if}}"></i>
</button>
{{/if}}
<button type="button" class="button edit">
<i class="icon-pencil" data-edit="{{$key}}"></i>
</button>
{{/if}}
{{/if}}
{{/unless}}
</div>
</li>
{{# if has $value 'message' }}
{{#let message=($value.message room)}}
{{#if message}}
<li>
<div class="alert alert-warning pending-background pending-border">
{{_ message}}
</div>
</li>
{{/if}}
{{/let}}
{{/if}}
{{/let}}
{{/if}}
{{/each}}
{{/let}}
</div>
</div>
{{/with}}
{{#with settings.ro}}
<div class="rc-user-info__row rc-user-info__row--separator">
<div class="rc-switch-double">
<div class="rc-switch-double__label {{equal true value 'disabled'}}">
{{_ "Read_only"}}{{equal default value '*'}}
<div class="rc-switch-double__description">
{{_ "Only_authorized_users_can_write_new_messages"}}
</div>
</div>
<div class="rc-switch rc-switch--blue">
<label class="rc-switch__label">
<input type="checkbox" class="rc-switch__input js-input-check" name="ro" checked="{{checked}}" disabled="{{disabled}}">
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
</label>
</div>
<div class="rc-switch-double__label {{equal false value 'disabled'}}">
{{_ "Colaborative"}}
<div class="rc-switch-double__description">
{{_ "All_users_in_the_channel_can_write_new_messages"}}
</div>
</div>
</div>
</div>
{{/with}}
{{#with settings.reactWhenReadOnly}}
{{#if canView}}
<div class="rc-user-info__row rc-user-info__row--separator">
<div class="rc-switch-double">
<div class="rc-switch-double__label {{equal true value 'disabled'}}">
{{_ "React_when_read_only"}}
<div class="rc-switch-double__description">
{{_ "React_when_read_only"}}
</div>
</div>
<div class="rc-switch rc-switch--blue">
<label class="rc-switch__label">
<input type="checkbox" class="rc-switch__input js-input-check" name="reactWhenReadOnly" checked="{{checked}}" disabled="{{./disabled}}">
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
</label>
</div>
<div class="rc-switch-double__label {{equal false value 'disabled'}}">
{{_ "No_reactions"}}
<div class="rc-switch-double__description">
{{_ "No_reactions"}}
</div>
</div>
</div>
</div>
{{/if}}
{{/with}}
{{#with settings.archived}}
{{#if canView}}
<div class="rc-user-info__row">
<div class="rc-switch rc-switch--blue">
<label class="rc-switch__label">
<span class="rc-switch__text">
{{_ label}}{{equal default value '*'}}
</span>
<input type="checkbox" class="rc-switch__input js-input-check" name="archived" checked="{{checked}}" disabled="{{./disabled}}">
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
</label>
</div>
</div>
{{/if}}
{{/with}}
{{#with settings.joinCode}}
<div class="rc-user-info__row">
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ label}}{{equal default value '*'}}</div>
<div class="rc-input__wrapper">
<input type="text" name="joinCode" value="{{value}}" class="rc-input__element js-input" disabled="{{./disabled}}"/>
</div>
</label>
</div>
</div>
{{/with}}
</div>
<div class="rc-user-info__row">
<div class="rc-user-info__flex rc-user-info__row rc-user-info__row--separator">
<button class="rc-button js-cancel rc-button--outline" title="{{_ 'Cancel'}}">{{_ 'Cancel'}}</button>
<button class="rc-button rc-button--secondary js-reset" {{modified 'disabled'}} title="{{_ 'Reset'}}">{{_ 'Reset'}}</button>
<button class="rc-button rc-button--primary js-save" {{modified 'disabled'}} title="{{_ 'Save'}}">{{_ 'Save'}}</button>
</div>
<div class="rc-user-info__flex">
{{#if canDeleteRoom}}
<button class="rc-button rc-button--outline rc-button--cancel js-delete" title="{{_ 'Delete'}}">{{> icon icon='trash'}}{{_ 'Delete'}}</button>
{{/if}}
</div>
</div>
</template>
<template name="channelSettingsInfo">
<main class="rc-user-info__scroll{{#if archived}} archived{{/if}}">
{{# with settings=settings}}
<div class="rc-user-info">
<div class="rc-user-info__avatar">
{{#if archived}}
<div class="rc-user-info__banner">
{{_ "Room_archived"}}
</div>
{{/if}}
{{> avatar username=channelName}}
</div>
<h3 title="{{name}}" class="rc-user-info__name">{{> icon block="rc-header__icon" icon=channelIcon}}{{ unscape name}}</h3>
{{#if password}}
<label class="rc-user-info__label">
{{_ "Room_archived"}}
</label>
{{/if}}
</div>
<label class="rc-user-info__label">
{{_ "Description"}}
<div class="rc-user-info__description">
{{unscape description}}
</div>
</label>
<label class="rc-user-info__label">
{{_ "Announcement"}}
<div class="rc-user-info__description">
{{unscape announcement}}
</div>
</label>
<label class="rc-user-info__label">
{{_ "Topic"}}
<div class="rc-user-info__description">
{{unscape topic}}
</div>
</label>
{{/with}}
{{#each channelSettings}}
<div class="rc-user-info__row">
{{> Template.dynamic template=template data=data}}
</div>
{{/each}}
</ul>
</form>
{{#if canDeleteRoom}}
<nav>
<button class="button danger delete" title="{{_ 'Delete'}}"><i class="icon-trash"></i></button>
</nav>
</main>
<div class="rc-user-info__flex rc-user-info__row">
{{#if canEditRoom}}
<button class="rc-button rc-button--icon rc-button--outline js-edit" type="submit">{{> icon icon='edit'}}{{_ "Edit"}}</button>
{{/if}}
<button class="rc-button rc-button--icon rc-button--outline js-hide" type="submit">{{> icon icon='eye-off'}}{{_ "Hide"}}</button>
{{#if canLeaveRoom}}
<button class="rc-button rc-button--icon rc-button--outline rc-button--cancel js-leave">{{> icon icon='sign-out'}}{{_ 'Leave'}}</button>
{{/if}}
<!-- {{#if canDeleteRoom}}
<button class="rc-button rc-button-outline rc-button-cancel js-delete" title="{{_ 'Delete'}}">{{> icon icon='trash'}}{{_ 'Delete'}}</button>
{{/if}} -->
</div>
</template>

@ -1,47 +1,10 @@
import toastr from 'toastr';
import s from 'underscore.string';
import { RocketChat, RoomSettingsEnum } from 'meteor/rocketchat:lib';
Template.channelSettings.helpers({
toArray(obj) {
return Object.keys(obj).map((key) => {
return {
$key: key,
$value: obj[key]
};
});
},
valueOf(obj, key) {
if (key === 't') {
if (obj[key] === 'c') {
return false;
}
return true;
}
if (this.$value.getValue) {
return this.$value.getValue(obj, key);
}
return obj && obj[key];
},
settings() {
return Template.instance().settings;
},
getRoom() {
return ChatRoom.findOne(this.rid);
},
editing(field) {
return Template.instance().editing.get() === field;
},
isDisabled(field, room) {
const setting = Template.instance().settings[field];
return (typeof setting.disabled === 'function' && setting.disabled(room)) || setting.processing.get() || !RocketChat.authz.hasAllPermission('edit-room', room._id);
},
channelSettings() {
return RocketChat.ChannelSettings.getOptions(Template.currentData(), 'room');
},
unscape(value) {
return s.unescapeHTML(value);
const can = {
canLeaveRoom() {
const { cl: canLeave, t: roomType } = Template.instance().room;
return roomType !== 'd' && canLeave !== false;
},
canDeleteRoom() {
const room = ChatRoom.findOne(this.rid, {
@ -53,128 +16,72 @@ Template.channelSettings.helpers({
const roomType = room && room.t;
return roomType && RocketChat.roomTypes.roomTypes[room.t].canBeDeleted(room);
},
readOnly() {
const room = ChatRoom.findOne(this.rid, {
fields: {
ro: 1
}
});
return room && room.ro;
},
has(v, key) {
return !!(v && v[key]);
},
readOnlyDescription() {
const room = ChatRoom.findOne(this.rid, {
fields: {
ro: 1
}
});
return t(room && room.ro ? 'True' : 'False');
},
showingValue(field) {
const { showingValue } = Template.instance().settings[field];
return showingValue && showingValue.get();
canEditRoom() {
const { _id } = Template.instance().room;
return RocketChat.authz.hasAllPermission('edit-room', _id);
}
});
Template.channelSettings.events({
'click .delete'() {
modal.open({
title: t('Are_you_sure'),
text: t('Delete_Room_Warning'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes_delete_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: false,
html: false
}, () => {
Meteor.call('eraseRoom', this.rid, function(error) {
if (error) {
return handleError(error);
}
modal.open({
title: t('Deleted'),
text: t('Room_has_been_deleted'),
type: 'success',
timer: 2000,
showConfirmButton: false
});
});
};
const call = (method, ...params) => {
return new Promise((resolve, reject) => {
Meteor.call(method, ...params, (err, result)=> {
if (err) {
handleError(err);
return reject(err);
}
return resolve(result);
});
},
'keydown input[type=text]'(e, t) {
if (e.keyCode === 13) {
e.preventDefault();
t.saveSetting();
}
},
async 'click [data-edit], click .button.edit'(e, t) {
e.preventDefault();
let input = $(e.currentTarget);
await t.showValue(this.$key, true);
});
};
if (input.hasClass('button')) {
input = $(e.currentTarget).siblings('.current-setting');
}
if (input.data('edit')) {
t.editing.set(input.data('edit'));
setTimeout((function() {
return t.$('input.editing').focus().select();
}), 100);
}
},
'click .button.show'(e, t) {
e.preventDefault();
t.showValue(this.$key);
Template.channelSettingsEditing.events({
'input .js-input'(e) {
this.value.set(e.currentTarget.value);
},
'change [type="radio"]'(e, t) {
return t.editing.set($(e.currentTarget).attr('name'));
'change .js-input-check'(e) {
this.value.set(e.currentTarget.checked);
},
'change [type="checkbox"]'(e, t) {
t.editing.set($(e.currentTarget).attr('name'));
return t.saveSetting();
'click .js-reset'(e, t) {
const {settings} = t;
Object.keys(settings).forEach(key => settings[key].value.set(settings[key].default.get()));
},
'click .cancel'(e, t) {
e.preventDefault();
t.cancelEditing(this.$key);
},
'click .save'(e, t) {
e.preventDefault();
return t.saveSetting();
async 'click .js-save'(e, t) {
const {settings} = t;
Object.keys(settings).forEach(async name => {
const setting = settings[name];
const value = setting.value.get();
if (setting.default.get() !== value) {
await setting.save(value).then(() => {
setting.default.set(value);
setting.value.set(value);
}, console.log);
}
});
}
});
Template.channelSettings.onCreated(function() {
this.editing = new ReactiveVar;
Template.channelSettingsEditing.onCreated(function() {
const room = this.room = ChatRoom.findOne(this.data && this.data.rid);
this.settings = {
name: {
type: 'text',
label: 'Name',
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.NAME);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('edit-room', room._id);
},
getValue(room) {
getValue() {
if (RocketChat.settings.get('UI_Allow_room_names_with_special_chars')) {
return room.fname || room.name;
}
return room.name;
},
save(value, room) {
save(value) {
let nameValidation;
if (!RocketChat.settings.get('UI_Allow_room_names_with_special_chars')) {
try {
nameValidation = new RegExp(`^${ RocketChat.settings.get('UTF8_Names_Validation') }$`);
@ -183,19 +90,14 @@ Template.channelSettings.onCreated(function() {
}
if (!nameValidation.test(value)) {
return toastr.error(t('error-invalid-room-name', {
return Promise.reject(toastr.error(t('error-invalid-room-name', {
room_name: {
name: value
}
}));
})));
}
}
Meteor.call('saveRoomSettings', room._id, RoomSettingsEnum.NAME, value, function(err) {
if (err) {
return handleError(err);
}
return call('saveRoomSettings', room._id, RoomSettingsEnum.NAME, value).then(function() {
RocketChat.callbacks.run('roomNameChanged', {
_id: room._id,
name: value
@ -208,18 +110,14 @@ Template.channelSettings.onCreated(function() {
topic: {
type: 'markdown',
label: 'Topic',
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.TOPIC);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('edit-room', room._id);
},
save(value, room) {
return Meteor.call('saveRoomSettings', room._id, RoomSettingsEnum.TOPIC, value, function(err) {
if (err) {
return handleError(err);
}
save(value) {
return call('saveRoomSettings', room._id, RoomSettingsEnum.TOPIC, value).then(function() {
toastr.success(TAPi18n.__('Room_topic_changed_successfully'));
return RocketChat.callbacks.run('roomTopicChanged', room);
});
@ -228,18 +126,14 @@ Template.channelSettings.onCreated(function() {
announcement: {
type: 'markdown',
label: 'Announcement',
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.ANNOUNCEMENT);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('edit-room', room._id);
},
save(value, room) {
return Meteor.call('saveRoomSettings', room._id, RoomSettingsEnum.ANNOUNCEMENT, value, function(err) {
if (err) {
return handleError(err);
}
save(value) {
return call('saveRoomSettings', room._id, RoomSettingsEnum.ANNOUNCEMENT, value).then(() => {
toastr.success(TAPi18n.__('Room_announcement_changed_successfully'));
return RocketChat.callbacks.run('roomAnnouncementChanged', room);
});
@ -248,38 +142,39 @@ Template.channelSettings.onCreated(function() {
description: {
type: 'text',
label: 'Description',
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.DESCRIPTION);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('edit-room', room._id);
},
save(value, room) {
return Meteor.call('saveRoomSettings', room._id, RoomSettingsEnum.DESCRIPTION, value, function(err) {
if (err) {
return handleError(err);
}
save(value) {
return call('saveRoomSettings', room._id, RoomSettingsEnum.DESCRIPTION, value).then(function() {
return toastr.success(TAPi18n.__('Room_description_changed_successfully'));
});
}
},
t: {
type: 'boolean',
label: 'Private',
// label() {
// return ;
// },
isToggle: true,
processing: new ReactiveVar(false),
disabled(room) {
getValue() {
return room.t === 'p';
},
disabled() {
return room['default'] && !RocketChat.authz.hasRole(Meteor.userId(), 'admin');
},
message(room) {
message() {
if (RocketChat.authz.hasAllPermission('edit-room', room._id) && room['default']) {
if (!RocketChat.authz.hasRole(Meteor.userId(), 'admin')) {
return 'Room_type_of_default_rooms_cant_be_changed';
}
}
},
canView(room) {
canView() {
if (!['c', 'p'].includes(room.t)) {
return false;
} else if (room.t === 'p' && !RocketChat.authz.hasAllPermission('create-c')) {
@ -289,43 +184,41 @@ Template.channelSettings.onCreated(function() {
}
return true;
},
canEdit(room) {
canEdit() {
return (RocketChat.authz.hasAllPermission('edit-room', room._id) && !room['default']) || RocketChat.authz.hasRole(Meteor.userId(), 'admin');
},
save(value, room) {
save(value) {
const saveRoomSettings = () => {
this.processing.set(true);
value = value ? 'p' : 'c';
RocketChat.callbacks.run('roomTypeChanged', room);
return Meteor.call('saveRoomSettings', room._id, 'roomType', value, (err) => {
if (err) {
return handleError(err);
}
this.processing.set(false);
return call('saveRoomSettings', room._id, 'roomType', value).then(() => {
return toastr.success(TAPi18n.__('Room_type_changed_successfully'));
});
};
if (room['default']) {
if (RocketChat.authz.hasRole(Meteor.userId(), 'admin')) {
modal.open({
title: t('Room_default_change_to_private_will_be_default_no_more'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes'),
cancelButtonText: t('Cancel'),
closeOnConfirm: true,
html: false
}, function(confirmed) {
if (confirmed) {
return saveRoomSettings();
}
return new Promise((resolve, reject)=> {
modal.open({
title: t('Room_default_change_to_private_will_be_default_no_more'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes'),
cancelButtonText: t('Cancel'),
closeOnConfirm: true,
html: false
}, function(confirmed) {
if (confirmed) {
return resolve(saveRoomSettings());
}
return reject();
});
});
}
return $('.channel-settings form [name=\'t\']').prop('checked', !!room.type === 'p');
} else {
return saveRoomSettings();
// return $('.channel-settings form [name=\'t\']').prop('checked', !!room.type === 'p');
}
return saveRoomSettings();
}
},
ro: {
@ -333,22 +226,14 @@ Template.channelSettings.onCreated(function() {
label: 'Read_only',
isToggle: true,
processing: new ReactiveVar(false),
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.READ_ONLY);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('set-readonly', room._id);
},
save(value, room) {
this.processing.set(true);
return Meteor.call('saveRoomSettings', room._id, RoomSettingsEnum.READ_ONLY, value, (err) => {
if (err) {
return handleError(err);
}
this.processing.set(false);
return toastr.success(TAPi18n.__('Read_only_changed_successfully'));
});
save(value) {
return call('saveRoomSettings', room._id, RoomSettingsEnum.READ_ONLY, value).then(() => toastr.success(TAPi18n.__('Read_only_changed_successfully')));
}
},
reactWhenReadOnly: {
@ -356,20 +241,14 @@ Template.channelSettings.onCreated(function() {
label: 'React_when_read_only',
isToggle: true,
processing: new ReactiveVar(false),
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.REACT_WHEN_READ_ONLY) && room.ro;
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('set-react-when-readonly', room._id);
},
save(value, room) {
this.processing.set(true);
Meteor.call('saveRoomSettings', room._id, 'reactWhenReadOnly', value, (err) => {
if (err) {
return handleError(err);
}
this.processing.set(false);
save(value) {
return call('saveRoomSettings', room._id, 'reactWhenReadOnly', value).then(() => {
toastr.success(TAPi18n.__('React_when_read_only_changed_successfully'));
});
}
@ -379,43 +258,39 @@ Template.channelSettings.onCreated(function() {
label: 'Room_archivation_state_true',
isToggle: true,
processing: new ReactiveVar(false),
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.ARCHIVE_OR_UNARCHIVE);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAtLeastOnePermission(['archive-room', 'unarchive-room'], room._id);
},
save(value, room) {
modal.open({
title: t('Are_you_sure'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: value ? t('Yes_archive_it') : t('Yes_unarchive_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: false,
html: false
}, function(confirmed) {
if (confirmed) {
const action = value ? 'archiveRoom' : 'unarchiveRoom';
Meteor.call(action, room._id, function(err) {
if (err) {
handleError(err);
}
modal.open({
title: value ? t('Room_archived') : t('Room_has_been_archived'),
text: value ? t('Room_has_been_archived') : t('Room_has_been_unarchived'),
type: 'success',
timer: 2000,
showConfirmButton: false
});
RocketChat.callbacks.run(action, room);
});
} else {
return $('.channel-settings form [name=\'archived\']').prop('checked', !!room.archived);
}
save(value) {
return new Promise((resolve, reject)=>{
modal.open({
title: t('Are_you_sure'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: value ? t('Yes_archive_it') : t('Yes_unarchive_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: false,
html: false
}, function(confirmed) {
if (confirmed) {
const action = value ? 'archiveRoom' : 'unarchiveRoom';
return resolve(call(action, room._id).then(() => {
modal.open({
title: value ? t('Room_archived') : t('Room_has_been_archived'),
text: value ? t('Room_has_been_archived') : t('Room_has_been_unarchived'),
type: 'success',
timer: 2000,
showConfirmButton: false
});
return RocketChat.callbacks.run(action, room);
}));
}
return reject();
});
});
}
},
@ -424,26 +299,26 @@ Template.channelSettings.onCreated(function() {
label: 'Password',
showingValue: new ReactiveVar(false),
realValue: null,
canView(room) {
canView() {
return RocketChat.roomTypes.roomTypes[room.t].allowRoomSettingChange(room, RoomSettingsEnum.JOIN_CODE) && RocketChat.authz.hasAllPermission('edit-room', room._id);
},
canEdit(room) {
canEdit() {
return RocketChat.authz.hasAllPermission('edit-room', room._id);
},
getValue(room) {
getValue() {
if (this.showingValue.get()) {
return this.realValue;
}
return room.joinCodeRequired ? '*****' : '';
},
showHideValue(room) {
showHideValue() {
return room.joinCodeRequired;
},
cancelEditing() {
this.showingValue.set(false);
this.realValue = null;
},
async showValue(room, forceShow = false) {
async showValue(_room, forceShow = false) {
if (this.showingValue.get()) {
if (forceShow) {
return;
@ -453,56 +328,234 @@ Template.channelSettings.onCreated(function() {
return null;
}
return Meteor.call('getRoomJoinCode', room._id, (error, result) => {
if (error) {
return handleError(error);
}
return call('getRoomJoinCode', room._id).then(result => {
this.realValue = result;
this.showingValue.set(true);
});
},
save(value, room) {
Meteor.call('saveRoomSettings', room._id, 'joinCode', value, function(err) {
if (err) {
return handleError(err);
}
save(value) {
return call('saveRoomSettings', room._id, 'joinCode', value).then(function() {
toastr.success(TAPi18n.__('Room_password_changed_successfully'));
return RocketChat.callbacks.run('roomCodeChanged', room);
});
}
}
};
this.saveSetting = () => {
const room = ChatRoom.findOne(this.data && this.data.rid);
const field = this.editing.get();
let value;
if (!this.settings[field]) {
return;
Object.keys(this.settings).forEach(key => {
const setting = this.settings[key];
const def =setting.getValue ? setting.getValue(this.room): this.room[key];
setting.default = new ReactiveVar(def || false);
setting.value = new ReactiveVar(def || false);
});
});
Template.channelSettingsEditing.helpers({
...can,
value() {
return this.value.get();
},
default() {
return this.default.get();
},
disabled() {
return !this.canEdit();
},
checked() {
return this.value.get();// ? '' : 'checked';
},
modified(text = '') {
const {settings} = Template.instance();
return !Object.keys(settings).some(key => settings[key].default.get() !== settings[key].value.get()) ? text : '';
},
equal(text = '', text2 = '', ret = '*') {
return text === text2 ? '' : ret;
},
getIcon(room) {
const roomType = RocketChat.models.Rooms.findOne(room._id).t;
switch (roomType) {
case 'd':
return 'at';
case 'p':
return 'lock';
case 'c':
return 'hashtag';
case 'l':
return 'livechat';
default :
return null;
}
if (this.settings[field].type === 'select') {
value = this.$(`.channel-settings form [name=${ field }]:checked`).val();
} else if (this.settings[field].type === 'boolean') {
value = this.$(`.channel-settings form [name=${ field }]`).is(':checked');
} else {
value = this.$(`.channel-settings form [name=${ field }]`).val();
},
settings() {
return Template.instance().settings;
},
editing(field) {
return Template.instance().editing.get() === field;
},
isDisabled(field, room) {
const setting = Template.instance().settings[field];
return (typeof setting.disabled === 'function' && setting.disabled(room)) || setting.processing.get() || !RocketChat.authz.hasAllPermission('edit-room', room._id);
},
unscape(value) {
return s.unescapeHTML(value);
}
});
Template.channelSettings.helpers({
editing() {
return Template.instance().editing.get();
}
});
Template.channelSettings.onCreated(function() {
this.room = ChatRoom.findOne(this.data && this.data.rid);
this.editing = new ReactiveVar(false);
});
Template.channelSettings.events({
'click .js-edit'(e, t) {
t.editing.set(true);
},
'click .js-leave'(e, instance) {
let warnText;
const { rid, name, t : type } = instance.room;
switch (type) {
case 'c': warnText = 'Leave_Room_Warning'; break;
case 'p': warnText = 'Leave_Group_Warning'; break;
case 'd': warnText = 'Leave_Private_Warning'; break;
case 'l': warnText = 'Leave_Livechat_Warning'; break;
}
if (value !== room[field]) {
this.settings[field].save(value, room);
modal.open({
title: t('Are_you_sure'),
text: warnText ? t(warnText, name) : '',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes_leave_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: true,
html: false
}, async function() {
if (['channel', 'group', 'direct'].includes(FlowRouter.getRouteName()) && (Session.get('openedRoom') === rid)) {
FlowRouter.go('home');
}
await call('leaveRoom', rid);
if (rid === Session.get('openedRoom')) {
Session.delete('openedRoom');
}
});
},
'click .js-hide'(e, instance) {
let warnText;
const { rid, name, t: type } = instance.room;
switch (type) {
case 'c': warnText = 'Hide_Room_Warning'; break;
case 'p': warnText = 'Hide_Group_Warning'; break;
case 'd': warnText = 'Hide_Private_Warning'; break;
case 'l': warnText = 'Hide_Livechat_Warning'; break;
}
this.cancelEditing(field);
};
this.showValue = async(field, forceShow) => {
if (!this.settings[field].showValue) {
return;
modal.open({
title: t('Are_you_sure'),
text: warnText ? t(warnText, name) : '',
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes_hide_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: true,
html: false
}, async function() {
if (['channel', 'group', 'direct'].includes(FlowRouter.getRouteName()) && (Session.get('openedRoom') === rid)) {
FlowRouter.go('home');
}
await call('hideRoom', rid);
if (rid === Session.get('openedRoom')) {
Session.delete('openedRoom');
}
});
},
'click .js-cancel'(e, t) {
t.editing.set(false);
},
'click .js-delete'() {
return modal.open({
title: t('Are_you_sure'),
text: t('Delete_Room_Warning'),
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#DD6B55',
confirmButtonText: t('Yes_delete_it'),
cancelButtonText: t('Cancel'),
closeOnConfirm: false,
html: false
}, () => {
call('eraseRoom', this.rid).then(() => {
modal.open({
title: t('Deleted'),
text: t('Room_has_been_deleted'),
type: 'success',
timer: 2000,
showConfirmButton: false
});
});
});
}
});
Template.channelSettingsInfo.onCreated(function() {
this.room = ChatRoom.findOne(this.data && this.data.rid);
});
Template.channelSettingsInfo.helpers({
...can,
channelName() {
return `@${ Template.instance().room.name }`;
},
archived() {
return Template.instance().room.archived;
},
unscape(value) {
return s.unescapeHTML(value);
},
channelSettings() {
return RocketChat.ChannelSettings.getOptions(Template.currentData(), 'room');
},
name() {
return Template.instance().room.name;
},
description() {
return Template.instance().room.description;
},
announcement() {
return Template.instance().room.announcement;
},
topic() {
return Template.instance().room.topic;
},
users() {
return Template.instance().room.usernames;
},
channelIcon() {
const roomType = Template.instance().room.t;
switch (roomType) {
case 'd':
return 'at';
case 'p':
return 'lock';
case 'c':
return 'hashtag';
case 'l':
return 'livechat';
default :
return null;
}
const room = ChatRoom.findOne(this.data && this.data.rid);
return this.settings[field].showValue(room, forceShow);
};
this.cancelEditing = (field) => {
const { cancelEditing } = this.settings[field];
cancelEditing && cancelEditing.call(this.settings[field]);
this.editing.set();
};
}
});

@ -1,5 +1,6 @@
const fields = ['roomName', 'roomTopic', 'roomAnnouncement', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass'];
Meteor.methods({
saveRoomSettings(rid, setting, value) {
saveRoomSettings(rid, settings, value) {
if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', {
'function': 'RocketChat.saveRoomName'
@ -10,25 +11,44 @@ Meteor.methods({
method: 'saveRoomSettings'
});
}
if (!['roomName', 'roomTopic', 'roomAnnouncement', 'roomDescription', 'roomType', 'readOnly', 'reactWhenReadOnly', 'systemMessages', 'default', 'joinCode', 'tokenpass'].some((s) => s === setting)) {
if (typeof settings !== 'object') {
settings = {
[settings] : value
};
}
if (!Object.keys(settings).every(key => fields.includes(key))) {
throw new Meteor.Error('error-invalid-settings', 'Invalid settings provided', {
method: 'saveRoomSettings'
});
}
if (!RocketChat.authz.hasPermission(Meteor.userId(), 'edit-room', rid)) {
throw new Meteor.Error('error-action-not-allowed', 'Editing room is not allowed', {
method: 'saveRoomSettings',
action: 'Editing_room'
});
}
if (setting === 'default' && !RocketChat.authz.hasPermission(this.userId, 'view-room-administration')) {
throw new Meteor.Error('error-action-not-allowed', 'Viewing room administration is not allowed', {
method: 'saveRoomSettings',
action: 'Viewing_room_administration'
const room = RocketChat.models.Rooms.findOneById(rid);
if (!room) {
throw new Meteor.Error('error-invalid-room', 'Invalid room', {
method: 'saveRoomSettings'
});
}
const room = RocketChat.models.Rooms.findOneById(rid);
if (room != null) {
const user = Meteor.user();
Object.keys(settings).forEach(setting => {
const value = settings[setting];
if (settings === 'default' && !RocketChat.authz.hasPermission(this.userId, 'view-room-administration')) {
throw new Meteor.Error('error-action-not-allowed', 'Viewing room administration is not allowed', {
method: 'saveRoomSettings',
action: 'Viewing_room_administration'
});
}
if (setting === 'roomType' && value !== room.t && value === 'c' && !RocketChat.authz.hasPermission(this.userId, 'create-c')) {
throw new Meteor.Error('error-action-not-allowed', 'Changing a private group to a public channel is not allowed', {
method: 'saveRoomSettings',
@ -41,28 +61,32 @@ Meteor.methods({
action: 'Change_Room_Type'
});
}
});
Object.keys(settings).forEach(setting => {
const value = settings[setting];
switch (setting) {
case 'roomName':
name = RocketChat.saveRoomName(rid, value, Meteor.user());
RocketChat.saveRoomName(rid, value, user);
break;
case 'roomTopic':
if (value !== room.topic) {
RocketChat.saveRoomTopic(rid, value, Meteor.user());
RocketChat.saveRoomTopic(rid, value, user);
}
break;
case 'roomAnnouncement':
if (value !== room.announcement) {
RocketChat.saveRoomAnnouncement(rid, value, Meteor.user());
RocketChat.saveRoomAnnouncement(rid, value, user);
}
break;
case 'roomDescription':
if (value !== room.description) {
RocketChat.saveRoomDescription(rid, value, Meteor.user());
RocketChat.saveRoomDescription(rid, value, user);
}
break;
case 'roomType':
if (value !== room.t) {
RocketChat.saveRoomType(rid, value, Meteor.user());
RocketChat.saveRoomType(rid, value, user);
}
break;
case 'tokenpass':
@ -77,17 +101,17 @@ Meteor.methods({
break;
case 'readOnly':
if (value !== room.ro) {
RocketChat.saveRoomReadOnly(rid, value, Meteor.user());
RocketChat.saveRoomReadOnly(rid, value, user);
}
break;
case 'reactWhenReadOnly':
if (value !== room.reactWhenReadOnly) {
RocketChat.saveReactWhenReadOnly(rid, value, Meteor.user());
RocketChat.saveReactWhenReadOnly(rid, value, user);
}
break;
case 'systemMessages':
if (value !== room.sysMes) {
RocketChat.saveRoomSystemMessages(rid, value, Meteor.user());
RocketChat.saveRoomSystemMessages(rid, value, user);
}
break;
case 'joinCode':
@ -96,7 +120,8 @@ Meteor.methods({
case 'default':
RocketChat.models.Rooms.saveDefaultById(rid, value);
}
}
});
return {
result: true,
rid: room._id

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"atlassian-crowd": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/atlassian-crowd/-/atlassian-crowd-0.5.0.tgz",
"integrity": "sha1-isdFqHg3mUkNF0H6Cc9HLn/zCTA="
}
}
}

@ -22,7 +22,3 @@ Package.onUse(function(api) {
api.export('CROWD', 'server');
});
Npm.depends({
'atlassian-crowd': '0.5.0'
});

@ -26,8 +26,7 @@ function fallbackDefaultAccountSystem(bind, username, password) {
const CROWD = class CROWD {
constructor() {
const AtlassianCrowd = Npm.require('atlassian-crowd');
const AtlassianCrowd = require('atlassian-crowd');
let url = RocketChat.settings.get('CROWD_URL');
const urlLastChar = url.slice(-1);

@ -1,12 +1,7 @@
<template name="adminSounds">
<div class="main-content-flex">
<section class="page-container page-list flex-tab-main-content">
<header class="fixed-title">
{{> burger}}
<h2>
<span class="room-title">{{_ "Custom_Sounds"}}</span>
</h2>
</header>
{{> header sectionName="Custom_Sounds"}}
<div class="content">
{{#requiresPermission 'manage-sounds'}}
<form class="search-form" role="form">

@ -1,19 +1,14 @@
<template name="adminEmoji">
<div class="main-content-flex">
<section class="page-container page-list flex-tab-main-content">
<header class="fixed-title border-component-color">
{{> burger}}
<h2>
<span class="room-title">{{_ "Custom_Emoji"}}</span>
</h2>
</header>
{{> header sectionName="Custom_emoji"}}
<div class="content">
{{#unless hasPermission 'manage-emoji'}}
<p>{{_ "You_are_not_authorized_to_view_this_page"}}</p>
{{else}}
<form class="search-form" role="form">
<div class="input-line search">
<input type="text" id="emoji-filter" placeholder="{{_ "Search"}}" dir="auto">
<input type="text" class="rc-input__element" id="emoji-filter" placeholder="{{_ "Search"}}" dir="auto">
<i class="icon-search secondary-font-color"></i>
{{#unless isReady}}<i class="icon-spin"></i>{{/unless}}
</div>

@ -1,5 +1,5 @@
// emoji.json from emojione@2.2.6
var fs = require('fs');
import fs from 'fs';
var emojiList = JSON.parse(fs.readFileSync('emoji.json', 'utf-8'));

@ -1,10 +1,16 @@
<template name="emojiPicker">
<div class="emoji-picker secondary-background-color">
<div class="emoji-picker rc-popover__content">
<div class="emoji-top">
<form class="emoji-filter input-line search search-form">
<input type="text" class="search content-background-color" autocomplete="off">
<i class="icon-search secondary-font-color"></i>
</form>
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__wrapper">
<div class="rc-input__icon">
{{> icon block="rc-input__icon-svg" icon="magnifier" }}
</div>
<input name="name" type="text" class="rc-input__element js-emojipicker-search" placeholder="{{_ "Search"}}" autocomplete="off">
</div>
</label>
</div>
<div class="change-tone">
<a href="#change-tone"><span class="current-tone {{currentTone}}"></span></a>
<ul class="tone-selector secondary-background-color">

@ -248,12 +248,7 @@ Template.emojiPicker.events({
RocketChat.EmojiPicker.pickEmoji(emoji + tone);
},
'keydown .emoji-filter .search'(event) {
if (event.keyCode === 13) {
event.preventDefault();
}
},
'keyup .emoji-filter .search, change .emoji-filter .search'(event, instance) {
'keyup .js-emojipicker-search, change .js-emojipicker-search'(event, instance) {
const value = event.target.value.trim();
const cst = instance.currentSearchTerm;
if (value === cst.get()) {

@ -56,7 +56,7 @@ RocketChat.EmojiPicker = {
setPosition() {
const sourcePos = $(this.source).offset();
const left = sourcePos.left;
const top = (sourcePos.top - this.height - 5);
const top = sourcePos.top - this.height - 60;
const cssProperties = {
top,
left
@ -70,7 +70,7 @@ RocketChat.EmojiPicker = {
cssProperties.left = 0;
} else {
const windowSize = $(window).width();
const pickerWidth = $('.emoji-picker').width();
const pickerWidth = $('.emoji-picker').outerWidth();
if (left + pickerWidth > windowSize) {
cssProperties.left = left - pickerWidth;

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"filesize": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/filesize/-/filesize-3.3.0.tgz",
"integrity": "sha1-UxSeo0YOOy4CSWKlFkiqVyz5gSI="
}
}
}

@ -43,7 +43,3 @@ Package.onUse(function(api) {
api.export('fileUploadHandler');
api.export('FileUpload');
});
Npm.depends({
'filesize': '3.3.0'
});

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,80 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"array-parallel": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/array-parallel/-/array-parallel-0.1.3.tgz",
"integrity": "sha1-j3hTCJJu1apHjEfmTRszS2wMlH0="
},
"array-series": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/array-series/-/array-series-0.1.5.tgz",
"integrity": "sha1-3103v8XC7wdV4qpPkv6ufUtaly8="
},
"cross-spawn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
"integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE="
},
"debug": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
"integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo="
},
"flushwritable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz",
"integrity": "sha1-PjKNj95BKtR+c44751C00pAENJg="
},
"gm": {
"version": "1.23.0",
"resolved": "https://registry.npmjs.org/gm/-/gm-1.23.0.tgz",
"integrity": "sha1-gKL+nL8TFRUCSEZERlhGEmn1JmE="
},
"gridfs-stream": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/gridfs-stream/-/gridfs-stream-1.1.1.tgz",
"integrity": "sha1-PdOhAOwgIaGBKC9utGcJY2B034k="
},
"isexe": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz",
"integrity": "sha1-NvPiLmB1CSD15yQaR2qMakInWtA="
},
"lru-cache": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.1.tgz",
"integrity": "sha1-E0OVXtry432bnn7nJB4nxLn7cr4="
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM="
},
"ms": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
"integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"which": {
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/which/-/which-1.2.11.tgz",
"integrity": "sha1-yLLu6muMFln6fB3U/aq+lTPcXos="
},
"yallist": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.0.0.tgz",
"integrity": "sha1-MGxUODXwnuGkyyO3vOmrNByRzdQ="
}
}
}

@ -14,9 +14,3 @@ Package.onUse(function(api) {
api.export('RocketChatFile', 'server');
});
Npm.depends({
'mkdirp': '0.5.1',
'gridfs-stream': '1.1.1',
'gm': '1.23.0'
});

@ -5,10 +5,6 @@ Package.describe({
git: ''
});
Npm.depends({
'@google-cloud/language': '0.8.0'
});
Package.onUse(function(api) {
api.use('ecmascript');
api.use('http');

@ -1,7 +1,6 @@
import './settings.js';
import './models/Rooms.js';
const googleLanguage = Npm.require('@google-cloud/language');
import googleLanguage from '@google-cloud/language';
let languageClient;

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

File diff suppressed because it is too large Load Diff

@ -5,11 +5,6 @@ Package.describe({
git: ''
});
Npm.depends({
'@google-cloud/storage': '1.2.1',
'@google-cloud/vision': '0.11.5'
});
Package.onUse(function(api) {
api.use([
'ecmascript',

@ -1,7 +1,7 @@
class GoogleVision {
constructor() {
this.storage = Npm.require('@google-cloud/storage');
this.vision = Npm.require('@google-cloud/vision');
this.storage = require('@google-cloud/storage');
this.vision = require('@google-cloud/vision');
this.storageClient = {};
this.visionClient = {};
this.enabled = RocketChat.settings.get('GoogleVision_Enable');

@ -997,7 +997,7 @@
"LDAP_Default_Domain_Description": "Wenn eine Standard-Domäne angegeben wurde, wird diese zur Erzeugung von E-Mail-Adressen verwendet, sofern keine E-Mail-Adresse aus dem LDAP importiert wurde. Die E-Mail wird konstruiert als `benutzername@standard-domäne` oder `unique_id@standard-domäne`<br/>Beispiel: `rocket.chat`",
"LDAP_Description": "LDAP ist eine hierarchische Datenbank, die viele Unternehmen nutzen, um eine eine Einmalanmeldung (SSO) zu ermöglichen. Über SSO kann \"ein Benutzer nach einer einmaligen Authentifizierung an einem Arbeitsplatz auf alle Rechner und Dienste, für die er lokal berechtigt ist, am selben Arbeitsplatz zugreifen kann, ohne sich jedes Mal neu anmelden zu müssen\". Genauere Informationen zur Konfiguration von LDAP mit Konfigurationsbeispielen erhalten Sie unter folgendem Link: https://rocket.chat/docs/administrator-guides/authentication/ldap/",
"LDAP_BaseDN": "Base DN",
"LDAP_BaseDN_Description": "Der volle Distinguished Name (DN) von einem LDAP-Unterverzeichnis, den Sie nach Benutzern und Gruppen durchsuchen möchten. Sie können so viele hinzufügen wie sie möchten. Jede Gruppe muss aber der selben Domainbasis angehören, in der sich die Benutzer befindet. Wenn Sie beschränkte Nutzergruppen angeben, werden nur Benutzer, die diesen Gruppen angehören, berücksichtig. Wir empfehlen, die oberste Ebene des LDAP-Verzeichnisbaums als Domainbasis anzugeben und Suchfilter zu verwenden, um Einschränkungen vorzunehmen.",
"LDAP_BaseDN_Description": "Der volle Distinguished Name (DN) von einem LDAP-Unterverzeichnis, den Sie nach Benutzern und Gruppen durchsuchen möchten. Sie können so viele hinzufügen wie sie möchten. Jede Gruppe muss aber der selben Domainbasis angehören, in der sich die Benutzer befindet. Beispiel: `ou=Users+ou=Projects,dc=Example,dc=com`. Wenn Sie beschränkte Nutzergruppen angeben, werden nur Benutzer, die diesen Gruppen angehören, berücksichtig. Wir empfehlen, die oberste Ebene des LDAP-Verzeichnisbaums als Domainbasis anzugeben und Suchfilter zu verwenden, um Einschränkungen vorzunehmen.",
"LDAP_User_Search_Field": "Suchfeld",
"LDAP_User_Search_Field_Description": "Das LDAP-Attribut, welches den LDAP-Benutzer identifiziert, der sich zu authentifizieren versucht. Das Feld ist für die meisten Active-Directory-Installationen `sAMAccountName`, für andere LDAP-Lösungen wie OpenLDAP kann dieses jedoch auch `uid` sein. Sie können aber auch `mail` verwenden, um Benutzer mit Ihrer E-Mail-Adresse zu identifizieren - oder jedes Attribut, das Sie möchten. <br/>Sie können mehrere Werte, getrennt mit Kommata, verwenden, um es Benutzern zu erlauben, sich mit mehreren Kennungen anzumelden, wie zum Beispiel einem Benutzernamen und der E-Mail-Adresse.",
"LDAP_User_Search_Filter": "Filter",

@ -183,6 +183,7 @@
"All_channels": "All channels",
"All_logs": "All logs",
"All_messages": "All messages",
"All_users": "All users",
"All_added_tokens_will_be_required_by_the_user": "All added tokens will be required by the user",
"All_users_in_the_channel_can_write_new_messages": "All users in the channel can write new messages",
"Allow_Invalid_SelfSigned_Certs": "Allow Invalid Self-Signed Certs",
@ -432,6 +433,7 @@
"create-user_description": "Permission to create users",
"Create_A_New_Channel": "Create a New Channel",
"Create_new": "Create new",
"Create_unique_rules_for_this_channel": "Create unique rules for this channel",
"Created_at": "Created at",
"Created_at_s_by_s": "Created at <strong>%s</strong> by <strong>%s</strong>",
"Created_at_s_by_s_triggered_by_s": "Created at <strong>%s</strong> by <strong>%s</strong> triggered by <strong>%s</strong>",
@ -466,6 +468,7 @@
"Custom_Sounds": "Custom Sounds",
"Custom_Translations": "Custom Translations",
"Custom_Translations_Description": "Should be a valid JSON where keys are languages containing a dictionary of key and translations. Example:<br/><code>{\n\"en\": {\n\"Channels\": \"Rooms\"\n},\n\"pt\": {\n\"Channels\": \"Salas\"\n}\n}</code> ",
"Customize": "Customize",
"CustomSoundsFilesystem": "Custom Sounds Filesystem",
"Dashboard": "Dashboard",
"Date": "Date",
@ -529,8 +532,10 @@
"Disable_Notifications": "Disable Notifications",
"Disable_two-factor_authentication": "Disable two-factor authentication",
"Disabled": "Disabled",
"Display_unread_counter": "Display number of unread messages",
"Display_offline_form": "Display Offline Form",
"Displays_action_text": "Displays action text",
"Do_not_display_unread_counter": "Do not display any counter of this channel",
"Do_you_want_to_change_to_s_question": "Do you want to change to <strong>%s</strong>?",
"Domain": "Domain",
"Domain_added": "domain Added",
@ -797,6 +802,7 @@
"Hex_Color_Preview": "Hex Color Preview",
"Hidden": "Hidden",
"Hide_Avatars": "Hide Avatars",
"Hide_counter": "Hide counter",
"Hide_flextab": "Hide Right Sidebar with Click",
"Hide_Group_Warning": "Are you sure you want to hide the group \"%s\"?",
"Hide_Livechat_Warning": "Are you sure you want to hide the livechat with \"%s\"?",
@ -992,6 +998,7 @@
"Katex_Enabled_Description": "Allow using <a target=\"_blank\" href=\"http://khan.github.io/KaTeX/\">katex</a> for math typesetting in messages",
"Katex_Parenthesis_Syntax": "Allow Parenthesis Syntax",
"Katex_Parenthesis_Syntax_Description": "Allow using \\[katex block\\] and \\(inline katex\\) syntaxes",
"Keep_default_user_settings": "Keep the default settings",
"Keyboard_Shortcuts_Edit_Previous_Message": "Edit previous message",
"Keyboard_Shortcuts_Keys_1": "<kbd>Ctrl</kbd> + <kbd>p</kbd>",
"Keyboard_Shortcuts_Keys_2": "<kbd>Up Arrow</kbd>",
@ -1027,7 +1034,7 @@
"LDAP_Default_Domain_Description": "If provided the Default Domain will be used to create an unique email for users where email was not imported from LDAP. The email will be mounted as `username@default_domain` or `unique_id@default_domain`.<br/>Example: `rocket.chat`",
"LDAP_Description": "LDAP is a hierarchical database that many companies use to provide single sign on - a facility for sharing one password between multiple sites and services. For advanced configuration information and examples, please consult our wiki: https://rocket.chat/docs/administrator-guides/authentication/ldap/.",
"LDAP_BaseDN": "Base DN",
"LDAP_BaseDN_Description": "The fully qualified Distinguished Name (DN) of an LDAP subtree you want to search for users and groups. You can add as many as you like; however, each group must be defined in the same domain base as the users that belong to it. If you specify restricted user groups, only users that belong to those groups will be in scope. We recommend that you specify the top level of your LDAP directory tree as your domain base and use search filter to control access.",
"LDAP_BaseDN_Description": "The fully qualified Distinguished Name (DN) of an LDAP subtree you want to search for users and groups. You can add as many as you like; however, each group must be defined in the same domain base as the users that belong to it. Example: `ou=Users+ou=Projects,dc=Example,dc=com`. If you specify restricted user groups, only users that belong to those groups will be in scope. We recommend that you specify the top level of your LDAP directory tree as your domain base and use search filter to control access.",
"LDAP_User_Search_Field": "Search Field",
"LDAP_User_Search_Field_Description": "The LDAP attribute that identifies the LDAP user who attempts authentication. This field should be `sAMAccountName` for most Active Directory installations, but it may be `uid` for other LDAP solutions, such as OpenLDAP. You can use `mail` to identify users by email or whatever attribute you want.<br>You can use multiple values separated by comma to allow users to login using multiple identifiers like username or email.",
"LDAP_User_Search_Filter": "Filter",
@ -1196,6 +1203,8 @@
"Members_List": "Members List",
"mention-all": "Mention All",
"mention-all_description": "Permission to use the @all mention",
"mention-here": "Mention Here",
"mention-here_description": "Permission to use the @here mention",
"Mentions": "Mentions",
"Mentions_default": "Mentions (default)",
"Mentions_only": "Mentions only",
@ -1278,6 +1287,7 @@
"Msgs": "Msgs",
"multi": "multi",
"multi_line": "multi line",
"Mute_all_notifications": "Mute all notifications",
"mute-user": "Mute User",
"mute-user_description": "Permission to mute other users in the same channel",
"Mute_someone_in_room": "Mute someone in the room",
@ -1343,6 +1353,7 @@
"Notifications_Max_Room_Members": "Max Room Members Before Disabling All Message Notifications",
"Notifications_Max_Room_Members_Description": "Max number of members in room when notifications for all messages gets disabled. Users can still change per room setting to receive all notifications on an individual basis. (0 to disable)",
"Notifications_Muted_Description": "If you choose to mute everything, you won't see the room highlight in the list when there are new messages, except for mentions. Muting notifications will override notifications settings.",
"Notifications_Preferences": "Notifications Preferences",
"Notifications_Sound_Volume": "Notifications sound volume",
"Notify_active_in_this_room": "Notify active users in this room",
"Notify_all_in_this_room": "Notify all in this room",
@ -1504,6 +1515,7 @@
"Read_only_channel": "Read Only Channel",
"Read_only_group": "Read Only Group",
"RealName_Change_Disabled": "Your Rocket.Chat administrator has disabled the changing of names",
"Receive_alerts": "Receive alerts",
"Record": "Record",
"Redirect_URI": "Redirect URI",
"Refresh_keys": "Refresh keys",
@ -1674,6 +1686,7 @@
"Should_exists_a_user_with_this_username": "The user must already exist.",
"Show_agent_email": "Show agent email",
"Show_all": "Show All",
"Show_counter": "Show counter",
"Show_room_counter_on_sidebar": "Show room counter on sidebar",
"Show_more": "Show more",
"show_offline_users": "show offline users",
@ -1899,6 +1912,8 @@
"Triggers": "Triggers",
"True": "True",
"Tuesday": "Tuesday",
"Turn_ON": "Turn ON",
"Turn_OFF": "Turn OFF",
"Two-factor_authentication": "Two-factor authentication",
"Two-factor_authentication_disabled": "Two-factor authentication disabled",
"Two-factor_authentication_enabled": "Two-factor authentication enabled",
@ -1965,6 +1980,7 @@
"User_added_by": "User <em>__user_added__</em> added by <em>__user_by__</em>.",
"User_added_successfully": "User added successfully",
"User_and_group_mentions_only": "User and group mentions only",
"User_default": "User default",
"User_doesnt_exist": "No user exists by the name of `@%s`.",
"User_has_been_activated": "User has been activated",
"User_has_been_deactivated": "User has been deactivated",

@ -1323,4 +1323,4 @@
"your_message_optional": "sua mensagem (opcional)",
"Your_password_is_wrong": "Sua senha está errada!",
"Your_push_was_sent_to_s_devices": "Sua natificação foi enviada para %s dispositivos"
}
}

@ -1348,4 +1348,4 @@
"your_message_optional": "sua mensagem (opcional)",
"Your_password_is_wrong": "Sua senha está errada!",
"Your_push_was_sent_to_s_devices": "Sua natificação foi enviada para %s dispositivos"
}
}

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"csv-parse": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-1.2.0.tgz",
"integrity": "sha1-BHtzhoq5qFdG6IX2N/ntD7ZFpCU="
}
}
}

@ -23,7 +23,3 @@ Package.onUse(function(api) {
// Client files
api.addFiles('client/adder.js', 'client');
});
Npm.depends({
'csv-parse': '1.2.0'
});

@ -10,7 +10,7 @@ export class CsvImporter extends Base {
constructor(info) {
super(info);
this.csvParser = Npm.require('csv-parse/lib/sync');
this.csvParser = require('csv-parse/lib/sync');
this.messages = new Map();
}

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,82 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"bl": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.1.2.tgz",
"integrity": "sha1-/cqHGplxOqANGeO7ukHER4emU5g=",
"dependencies": {
"readable-stream": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44="
}
}
},
"buffer-shims": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
"integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"end-of-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.1.0.tgz",
"integrity": "sha1-6TUyWLqpEIll78QcsO+K3i88+wc="
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"once": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz",
"integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA="
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"readable-stream": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.2.tgz",
"integrity": "sha1-qeb+w8fdqF+LsbO6cChgRVb8gl4="
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"tar-stream": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.2.tgz",
"integrity": "sha1-+8bG6DwaGdTLSMfZYXH8JI7/x78="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
}
}
}

@ -23,7 +23,3 @@ Package.onUse(function(api) {
// Client files
api.addFiles('client/adder.js', 'client');
});
Npm.depends({
'tar-stream': '1.5.2'
});

@ -5,16 +5,18 @@ import {
SelectionChannel,
SelectionUser
} from 'meteor/rocketchat:importer';
import {Readable} from 'stream';
import path from 'path';
export class HipChatEnterpriseImporter extends Base {
constructor(info) {
super(info);
this.Readable = require('stream').Readable;
this.Readable = Readable;
this.zlib = require('zlib');
this.tarStream = Npm.require('tar-stream');
this.tarStream = require('tar-stream');
this.extract = this.tarStream.extract();
this.path = require('path');
this.path = path;
this.messages = new Map();
this.directMessages = new Map();
}

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,10 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"csv-parse": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/csv-parse/-/csv-parse-1.2.0.tgz",
"integrity": "sha1-BHtzhoq5qFdG6IX2N/ntD7ZFpCU="
}
}
}

@ -23,7 +23,3 @@ Package.onUse(function(api) {
// Client files
api.addFiles('client/adder.js', 'client');
});
Npm.depends({
'csv-parse': '1.2.0'
});

@ -9,7 +9,7 @@ export class SlackUsersImporter extends Base {
constructor(info) {
super(info);
this.csvParser = Npm.require('csv-parse/lib/sync');
this.csvParser = require('csv-parse/lib/sync');
this.userMap = new Map();
this.admins = []; //Array of ids of the users which are admins
}

@ -1,7 +0,0 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

@ -1,15 +0,0 @@
{
"lockfileVersion": 1,
"dependencies": {
"adm-zip": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.7.tgz",
"integrity": "sha1-hgbCy/HEJs6MjsABdER/1Jtur8E="
},
"bson": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/bson/-/bson-0.5.5.tgz",
"integrity": "sha1-HWcl1ADw+/AnG/a6/I+hEmwpmDs="
}
}
}

@ -1,11 +1,6 @@
<template name="adminImport">
<section class="page-container page-home page-static page-settings">
<header class="fixed-title border-component-color">
{{> burger}}
<h2>
<span class="room-title">{{_ "Import"}}</span>
</h2>
</header>
{{> header sectionName="Import"}}
<div class="content">
{{#unless isAdmin}}
<p>{{_ "You_are_not_authorized_to_view_this_page"}}</p>

@ -1,12 +1,7 @@
<template name="adminImportPrepare">
<section class="page-container page-home page-static page-settings">
{{#with importer}}
<header class="fixed-title border-component-color">
{{> burger}}
<h2>
<span class="room-title">{{name}}</span>
</h2>
</header>
{{> header sectionName=name}}
<div class="content">
{{#unless isAdmin}}
<p>{{_ "You_are_not_authorized_to_view_this_page"}}</p>

@ -54,8 +54,3 @@ Package.onUse(function(api) {
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
Npm.depends({
'adm-zip': '0.4.7',
'bson': '0.5.5'
});

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save