diff --git a/server/src/client/ConnectedClientCommandHandler.cpp b/server/src/client/ConnectedClientCommandHandler.cpp index 3fbe1bb..8858bf5 100644 --- a/server/src/client/ConnectedClientCommandHandler.cpp +++ b/server/src/client/ConnectedClientCommandHandler.cpp @@ -3015,8 +3015,8 @@ CommandResult ConnectedClient::handleCommandServerGroupAutoAddPerm(ts::Command& permission::v2::PermissionUpdateType::set_value, permission::v2::PermissionUpdateType::do_nothing, - cmd[index]["permnegated"].as() ? 1 : 0, - cmd[index]["permskip"].as() ? 1 : 0 + cmd[index]["permskip"].as() ? 1 : 0, + cmd[index]["permnegated"].as() ? 1 : 0 ); } } @@ -5801,7 +5801,7 @@ CommandResult ConnectedClient::handleCommandPermOverview(Command &cmd) { result[index]["s"] = permission.flags.skip; index++; } - if(permission.flags.skip) { + if(permission.flags.grant_set) { result[index]["t"] = 0; /* server group */ result[index]["id1"] = server_group->group->groupId(); result[index]["id2"] = 0; @@ -5829,7 +5829,7 @@ CommandResult ConnectedClient::handleCommandPermOverview(Command &cmd) { result[index]["s"] = permission.flags.skip; index++; } - if(permission.flags.skip) { + if(permission.flags.grant_set) { result[index]["t"] = 1; /* client */ result[index]["id1"] = client_dbid; result[index]["id2"] = 0; @@ -5858,7 +5858,7 @@ CommandResult ConnectedClient::handleCommandPermOverview(Command &cmd) { result[index]["s"] = permission.flags.skip; index++; } - if(permission.flags.skip) { + if(permission.flags.grant_set) { result[index]["t"] = 2; /* server channel */ result[index]["id1"] = channel->channelId(); result[index]["id2"] = 0; @@ -5887,7 +5887,7 @@ CommandResult ConnectedClient::handleCommandPermOverview(Command &cmd) { result[index]["s"] = permission.flags.skip; index++; } - if(permission.flags.skip) { + if(permission.flags.grant_set) { result[index]["t"] = 3; /* channel group */ result[index]["id1"] = channel_group->channelId; result[index]["id2"] = channel_group->group->groupId(); @@ -5915,7 +5915,7 @@ CommandResult ConnectedClient::handleCommandPermOverview(Command &cmd) { result[index]["s"] = permission.flags.skip; index++; } - if(permission.flags.skip) { + if(permission.flags.grant_set) { result[index]["t"] = 1; /* client */ result[index]["id1"] = std::get<1>(permission_data); result[index]["id2"] = client_dbid; @@ -6605,7 +6605,7 @@ CommandResult ConnectedClient::handleCommandPlaylistAddPerm(ts::Command &cmd) { playlist->permissions()->setPermissionGranted(permType, cmd[index]["permvalue"], nullptr); } else { - playlist->permissions()->setPermission(permType, cmd[index]["permvalue"], nullptr, cmd[index]["permnegated"], cmd[index]["permskip"]); + playlist->permissions()->setPermission(permType, cmd[index]["permvalue"], nullptr, cmd[index]["permskip"], cmd[index]["permnegated"]); } }