3
0

Fix attachment access-control

This commit is contained in:
Denis Arh 2019-05-20 19:17:21 +02:00
parent 4a629c0ea9
commit 8b79c26a87

View File

@ -122,7 +122,7 @@ func (svc attachment) Create(name string, size int64, fh io.ReadSeeker, channelI
if ch, err := svc.channel.FindByID(channelId); err != nil {
return nil, err
} else if svc.ac.CanAttachMessage(svc.ctx, ch) {
} else if !svc.ac.CanAttachMessage(svc.ctx, ch) {
return nil, ErrNoPermissions.withStack()
}