summaryrefslogtreecommitdiffstats
path: root/app/core/files.js
diff options
context:
space:
mode:
authorSimon Bartlett <simon@securitycompass.com>2015-05-22 12:37:50 -0400
committerSimon Bartlett <simon@securitycompass.com>2015-05-22 12:38:05 -0400
commitf24e5491c8a79f8cadb9060a361f259e94ee7ace (patch)
tree8372f002f43d0b6bb9931eea15def4894ac2e557 /app/core/files.js
parent80f47ae221ab713fc8c82947b7a58d5a6eace9d1 (diff)
downloadlets-chat-f24e5491c8a79f8cadb9060a361f259e94ee7ace.zip
lets-chat-f24e5491c8a79f8cadb9060a361f259e94ee7ace.tar.gz
lets-chat-f24e5491c8a79f8cadb9060a361f259e94ee7ace.tar.bz2
Private rooms - participant list is editable
Diffstat (limited to 'app/core/files.js')
-rw-r--r--app/core/files.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/core/files.js b/app/core/files.js
index 7b5efa8..f1f85cb 100644
--- a/app/core/files.js
+++ b/app/core/files.js
@@ -55,6 +55,9 @@ FileManager.prototype.create = function(options, cb) {
if (room.archived) {
return cb('Room is archived.');
}
+ if (!room.isAuthorized(options.owner)) {
+ return cb('Not authorized.');
+ }
new File({
owner: options.owner,