manager: Make an error message less specific
Philip Withnall pointed out that if mct_manager_get_session_limits() fails with G_DBUS_ERROR_ACCESS_DENIED or org.freedesktop.Accounts.Error.PermissionDenied, the error message will wrongly refer to app filter data. Make it more generally applicable. Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
parent
1abce3eb91
commit
b5b1ac26a2
|
@ -280,7 +280,7 @@ bus_error_to_manager_error (const GError *bus_error,
|
||||||
if (g_error_matches (bus_error, G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED) ||
|
if (g_error_matches (bus_error, G_DBUS_ERROR, G_DBUS_ERROR_ACCESS_DENIED) ||
|
||||||
bus_remote_error_matches (bus_error, "org.freedesktop.Accounts.Error.PermissionDenied"))
|
bus_remote_error_matches (bus_error, "org.freedesktop.Accounts.Error.PermissionDenied"))
|
||||||
return g_error_new (MCT_MANAGER_ERROR, MCT_MANAGER_ERROR_PERMISSION_DENIED,
|
return g_error_new (MCT_MANAGER_ERROR, MCT_MANAGER_ERROR_PERMISSION_DENIED,
|
||||||
_("Not allowed to query app filter data for user %u"),
|
_("Not allowed to query parental controls data for user %u"),
|
||||||
(guint) user_id);
|
(guint) user_id);
|
||||||
else if (g_error_matches (bus_error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD) ||
|
else if (g_error_matches (bus_error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD) ||
|
||||||
bus_remote_error_matches (bus_error, "org.freedesktop.Accounts.Error.Failed"))
|
bus_remote_error_matches (bus_error, "org.freedesktop.Accounts.Error.Failed"))
|
||||||
|
|
Loading…
Reference in New Issue