Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stray ultimate arg from function delete_user #2230

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -5103,7 +5103,6 @@ gmp_xml_handle_start_element (/* unused */ GMarkupParseContext* context,
}
else if (strcasecmp ("DELETE_USER", element_name) == 0)
{
const gchar* attribute;
append_attribute (attribute_names, attribute_values, "name",
&delete_user_data->name);
append_attribute (attribute_names, attribute_values, "user_id",
Expand All @@ -5114,11 +5113,6 @@ gmp_xml_handle_start_element (/* unused */ GMarkupParseContext* context,
append_attribute (attribute_names, attribute_values,
"inheritor_name",
&delete_user_data->inheritor_name);
if (find_attribute (attribute_names, attribute_values,
"ultimate", &attribute))
delete_user_data->ultimate = strcmp (attribute, "0");
else
delete_user_data->ultimate = 0;
set_client_state (CLIENT_DELETE_USER);
}
else if (strcasecmp ("DESCRIBE_AUTH", element_name) == 0)
Expand Down Expand Up @@ -19704,7 +19698,6 @@ gmp_xml_handle_end_element (/* unused */ GMarkupParseContext* context,
if (delete_user_data->user_id || delete_user_data->name)
switch (delete_user (delete_user_data->user_id,
delete_user_data->name,
delete_user_data->ultimate,
1,
delete_user_data->inheritor_id,
delete_user_data->inheritor_name))
Expand Down
2 changes: 1 addition & 1 deletion src/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3590,7 +3590,7 @@ create_user (const gchar *, const gchar *, const gchar *, const gchar *,
array_t *, gchar **, gchar **, user_t *, int);

int
delete_user (const char *, const char *, int, int, const char*, const char*);
delete_user (const char *, const char *, int, const char*, const char*);

int
modify_user (const gchar *, gchar **, const gchar *, const gchar *,
Expand Down
5 changes: 2 additions & 3 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -53374,7 +53374,7 @@ manage_delete_user (GSList *log_config, const db_conn_info_t *database,
/* Setup a dummy user, so that delete_user will work. */
current_credentials.uuid = "";

switch ((ret = delete_user (NULL, name, 1, 0, NULL, inheritor_name)))
switch ((ret = delete_user (NULL, name, 0, NULL, inheritor_name)))
{
case 0:
printf ("User deleted.\n");
Expand Down Expand Up @@ -54009,7 +54009,6 @@ copy_user (const char* name, const char* comment, const char *user_id,
*
* @param[in] user_id_arg UUID of user.
* @param[in] name_arg Name of user. Overridden by user_id.
* @param[in] ultimate Whether to remove entirely, or to trashcan.
* @param[in] forbid_super_admin Whether to forbid removal of Super Admin.
* @param[in] inheritor_id UUID of user who will inherit owned objects.
* @param[in] inheritor_name Name of user who will inherit owned objects.
Expand All @@ -54020,7 +54019,7 @@ copy_user (const char* name, const char* comment, const char *user_id,
* 10 user is 'Feed Import Owner' 99 permission denied, -1 error.
*/
int
delete_user (const char *user_id_arg, const char *name_arg, int ultimate,
delete_user (const char *user_id_arg, const char *name_arg,
int forbid_super_admin,
const char* inheritor_id, const char *inheritor_name)
{
Expand Down
Loading