mirror of https://github.com/calzoneman/sync.git
Compare owner name case-insensitively when deleting channel
This commit is contained in:
parent
0613083eb0
commit
309cd40da2
|
@ -2,7 +2,7 @@
|
||||||
"author": "Calvin Montgomery",
|
"author": "Calvin Montgomery",
|
||||||
"name": "CyTube",
|
"name": "CyTube",
|
||||||
"description": "Online media synchronizer and chat",
|
"description": "Online media synchronizer and chat",
|
||||||
"version": "3.34.4",
|
"version": "3.34.5",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "http://github.com/calzoneman/sync"
|
"url": "http://github.com/calzoneman/sync"
|
||||||
},
|
},
|
||||||
|
|
|
@ -325,7 +325,7 @@ function handleDeleteChannel(req, res) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (channel.owner !== req.user.name && req.user.global_rank < 255) {
|
if ((!channel.owner || channel.owner.toLowerCase() !== req.user.name.toLowerCase()) && req.user.global_rank < 255) {
|
||||||
db.channels.listUserChannels(req.user.name, function (err2, channels) {
|
db.channels.listUserChannels(req.user.name, function (err2, channels) {
|
||||||
sendPug(res, "account-channels", {
|
sendPug(res, "account-channels", {
|
||||||
channels: err2 ? [] : channels,
|
channels: err2 ? [] : channels,
|
||||||
|
|
Loading…
Reference in New Issue