The RootHistory intends to record by whom and when the root user of the
underlying datastore backend was enabled. So the "user" column should
always be set to the context user, not the actual root user in the
database. But report_root(and report_root_enabled in
taskmanager.models) use the database user instead, this is not correct,
This patch will fix.
Also remove the "user" argument from Root.create() and
HistoryRoot.create() because the context is already passed in as an
argument when these methods are called.
Reviewed: https:/ /review. openstack. org/541630 /git.openstack. org/cgit/ openstack/ trove/commit/ ?id=3b726f3013b 0ba2a9f86b5b652 78fadb981335cf
Committed: https:/
Submitter: Zuul
Branch: master
commit 3b726f3013b0ba2 a9f86b5b65278fa db981335cf
Author: Zhao Chao <email address hidden>
Date: Wed Feb 7 15:37:30 2018 +0800
report_root should always use context.user
The RootHistory intends to record by whom and when the root user of the .models) use the database user instead, this is not correct,
underlying datastore backend was enabled. So the "user" column should
always be set to the context user, not the actual root user in the
database. But report_root(and report_root_enabled in
taskmanager
This patch will fix.
Also remove the "user" argument from Root.create() and .create( ) because the context is already passed in as an
HistoryRoot
argument when these methods are called.
Closes-Bug: #1546372 76fb384f0c5841d 2d391bd555d
Change-Id: I3b4c8ee56c7e08
Signed-off-by: Zhao Chao <email address hidden>