Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 0e4f71e739969656eb72b101eb1d34fdc22bb768
https://github.com/tribe29/checkmk/commit/0e4f71e739969656eb72b101eb1d34fdc…
Author: Sven Panne <sven.panne(a)tribe29.com>
Date: 2022-03-29 (Tue, 29 Mar 2022)
Changed paths:
M livestatus/src/Query.cc
M livestatus/src/Query.h
M livestatus/src/Store.cc
M livestatus/src/Store.h
M livestatus/src/Table.h
M livestatus/src/TableColumns.cc
M livestatus/src/TableColumns.h
M livestatus/src/TableCommands.cc
M livestatus/src/TableCommands.h
M livestatus/src/TableComments.cc
M livestatus/src/TableComments.h
M livestatus/src/TableContactGroups.cc
M livestatus/src/TableContactGroups.h
M livestatus/src/TableContacts.cc
M livestatus/src/TableContacts.h
M livestatus/src/TableCrashReports.cc
M livestatus/src/TableCrashReports.h
M livestatus/src/TableDowntimes.cc
M livestatus/src/TableDowntimes.h
M livestatus/src/TableEventConsole.cc
M livestatus/src/TableEventConsole.h
M livestatus/src/TableEventConsoleReplication.cc
M livestatus/src/TableEventConsoleReplication.h
M livestatus/src/TableHostGroups.cc
M livestatus/src/TableHostGroups.h
M livestatus/src/TableHosts.cc
M livestatus/src/TableHosts.h
M livestatus/src/TableHostsByGroup.cc
M livestatus/src/TableHostsByGroup.h
M livestatus/src/TableLog.cc
M livestatus/src/TableLog.h
M livestatus/src/TableServiceGroups.cc
M livestatus/src/TableServiceGroups.h
M livestatus/src/TableServices.cc
M livestatus/src/TableServices.h
M livestatus/src/TableServicesByGroup.cc
M livestatus/src/TableServicesByGroup.h
M livestatus/src/TableServicesByHostGroup.cc
M livestatus/src/TableServicesByHostGroup.h
M livestatus/src/TableStateHistory.cc
M livestatus/src/TableStateHistory.h
M livestatus/src/TableStatus.cc
M livestatus/src/TableStatus.h
M livestatus/src/TableTimeperiods.cc
M livestatus/src/TableTimeperiods.h
M livestatus/src/auth.cc
M livestatus/src/auth.h
M livestatus/src/test/TableQueryHelper.cc
Log Message:
-----------
Refactoring: Introduce a User object to bundle authorization code.
Although the change is quite big, it is completely mechanical and basically
easy: The main change is the introduction of the User class, which just
wraps existing code in auth.cc. An instance of this is used instead of a
"naked" contact in the Table classes to simplify and centralize the
authorization checks.
Note that TableEventConsole::isAuthorizedForEvent() and Filter::accepts()
still use a "naked" contact instead of a User instance. This will be fixed
in upcoming commits.
Change-Id: Ic4e101f2881d70f3f8d37f86e7d707ca4af63724