Skip to content

Commit

Permalink
Merge pull request #1328 from timopollmeier/deleted-user-settings
Browse files Browse the repository at this point in the history
Do not inherit settings from deleted users
  • Loading branch information
mattmundell authored Oct 14, 2020
2 parents 9ef78d0 + 4b35870 commit 0754740
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Correct check of get_certificate_info return [#1318](https://github.com/greenbone/gvmd/pull/1318)
- Fix GMP doc text of `active` elem for notes and overrides [#1323](https://github.com/greenbone/gvmd/pull/1323)
- Move feed object in trash checks to startup [#1325](https://github.com/greenbone/gvmd/pull/1325)
- Do not inherit settings from deleted users [#1328](https://github.com/greenbone/gvmd/pull/1328)

### Removed
- Remove DROP from vulns creation [#1281](http://github.com/greenbone/gvmd/pull/1281)
Expand Down
3 changes: 1 addition & 2 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -52342,8 +52342,6 @@ delete_user (const char *user_id_arg, const char *name_arg, int ultimate,
inheritor, user);
sql ("UPDATE schedules_trash SET owner = %llu WHERE owner = %llu;",
inheritor, user);
sql ("UPDATE settings SET owner = %llu WHERE owner = %llu;",
inheritor, user);
sql ("DELETE FROM tag_resources"
" WHERE resource_type = 'user' AND resource = %llu;",
user);
Expand Down Expand Up @@ -52385,6 +52383,7 @@ delete_user (const char *user_id_arg, const char *name_arg, int ultimate,

delete_permissions_cache_for_user (user);

sql ("DELETE FROM settings WHERE owner = %llu;", user);
sql ("DELETE FROM users WHERE id = %llu;", user);

sql_commit ();
Expand Down

0 comments on commit 0754740

Please sign in to comment.