Some minor changes
This commit is contained in:
parent
4c7a70bc81
commit
97e2ded4fb
@ -672,7 +672,9 @@ command_result ConnectedClient::handleCommandChannelCreate(Command &cmd) {
|
|||||||
|
|
||||||
test_permission(true, permission::b_channel_create_with_sortorder);
|
test_permission(true, permission::b_channel_create_with_sortorder);
|
||||||
} else if (key == "channel_flag_default") {
|
} else if (key == "channel_flag_default") {
|
||||||
test_permission(true, permission::b_channel_create_with_default);
|
if(cmd["channel_flag_default"].as<bool>()) {
|
||||||
|
test_permission(true, permission::b_channel_create_with_default);
|
||||||
|
}
|
||||||
} else if (key == "channel_name" ||key == "channel_name_phonetic") {
|
} else if (key == "channel_name" ||key == "channel_name_phonetic") {
|
||||||
/* channel create requires a name */
|
/* channel create requires a name */
|
||||||
} else if (key == "channel_topic") {
|
} else if (key == "channel_topic") {
|
||||||
@ -1039,7 +1041,9 @@ command_result ConnectedClient::handleCommandChannelEdit(Command &cmd) {
|
|||||||
} else if (key == "channel_order") {
|
} else if (key == "channel_order") {
|
||||||
ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_sortorder, 1, channel_id);
|
ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_sortorder, 1, channel_id);
|
||||||
} else if (key == "channel_flag_default") {
|
} else if (key == "channel_flag_default") {
|
||||||
ACTION_REQUIRES_GLOBAL_PERMISSION(permission::b_channel_modify_make_default, 1);
|
if(cmd["channel_flag_default"].as<bool>()) {
|
||||||
|
ACTION_REQUIRES_GLOBAL_PERMISSION(permission::b_channel_modify_make_default, 1);
|
||||||
|
}
|
||||||
} else if (key == "channel_name") {
|
} else if (key == "channel_name") {
|
||||||
ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_name, 1, channel_id);
|
ACTION_REQUIRES_PERMISSION(permission::b_channel_modify_name, 1, channel_id);
|
||||||
} else if (key == "channel_name_phonetic") {
|
} else if (key == "channel_name_phonetic") {
|
||||||
|
Loading…
Reference in New Issue
Block a user