Added missing permissions

This commit is contained in:
WolverinDEV 2020-12-03 11:12:18 +01:00
parent 364b3781b1
commit 5ee731bc92

View File

@ -45,7 +45,7 @@ if(!result && result.msg().find(ignore) == string::npos){
#define RESIZE_COLUMN(tblName, rowName, size) up vote EXECUTE("Could not change column size", "ALTER TABLE " tblName " ALTER COLUMN " rowName " varchar(" size ")");
#define CURRENT_DATABASE_VERSION 17
#define CURRENT_PERMISSION_VERSION 5
#define CURRENT_PERMISSION_VERSION 6
#define CLIENT_UID_LENGTH "64"
#define CLIENT_NAME_LENGTH "128"
@ -765,6 +765,75 @@ bool SqlDataManager::update_permissions(std::string &error) {
if(!auto_update(permission::update::CHANNEL_ADMIN, "b_channel_create_modify_conversation_mode_none", {1, true}, false, false, {0, false}))
return false;
perm_version(5);
case 5:
if(!auto_update(permission::update::QUERY_ADMIN, "b_virtualserver_modify_maxchannels", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_virtualserver_modify_maxchannels", {1, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "b_channel_create_modify_conversation_mode_private", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_channel_create_modify_conversation_mode_private", {1, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "b_channel_create_modify_conversation_mode_public", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_channel_create_modify_conversation_mode_public", {1, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "b_channel_create_modify_conversation_mode_none", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_channel_create_modify_conversation_mode_none", {1, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "i_client_poke_max_clients", {-2, false}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "i_client_poke_max_clients", {50, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "b_client_query_create_own", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_client_query_create_own", {1, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "i_playlist_song_move_power", {100, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "i_playlist_song_move_power", {75, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "i_playlist_song_needed_move_power", {100, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "i_playlist_song_needed_move_power", {75, true}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "i_ft_max_bandwidth_download", {-2, false}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "i_ft_max_bandwidth_download", {-2, false}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "i_ft_max_bandwidth_upload", {-2, false}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "i_ft_max_bandwidth_upload", {-2, false}, false, false, {75, true}))
return false;
if(!auto_update(permission::update::QUERY_ADMIN, "b_channel_create_modify_sidebar_mode", {1, true}, false, false, {100, true}))
return false;
if(!auto_update(permission::update::SERVER_ADMIN, "b_channel_create_modify_sidebar_mode", {1, true}, false, false, {75, true}))
return false;
perm_version(6);
default:
break;
}