Skip to content
Snippets Groups Projects
Commit 9e7e5a84 authored by Maki Nishifuji's avatar Maki Nishifuji
Browse files

Bugfix: Cannot remove uploads

Conditions:
 - Enable Show Deleted Status
 - Enable Keep per message editing history
parent 36d06383
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ UploadFS.config.defaultStorePermissions = new UploadFS.StorePermissions({
return userId;
},
update: function(userId, doc) {
return userId === doc.userId;
return RocketChat.authz.hasPermission(Meteor.userId(), 'delete-message', doc.rid) || (RocketChat.settings.get('Message_AllowDeleting') && userId === doc.userId);
},
remove: function(userId, doc) {
return RocketChat.authz.hasPermission(Meteor.userId(), 'delete-message', doc.rid) || (RocketChat.settings.get('Message_AllowDeleting') && userId === doc.userId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment