Closed klonos closed 8 years ago
Thanks @klonos, user_access
always checks the currently-logged-in-user's permissions.
if syslog.module is not enabled, there will be no logs to check. Right?
Logs could be syslog module, dblog module, or any other logging tool. We have no way of knowing which tool any given site is using for logging. There could be logs. There might not be! All this message does is indicate that this module is logging, and let the user figure out where (as we are doing).
LMK if you think this is still too confusing, I don't feel strongly about keeping the "check the logs" text in there, and it would be easy to remove :)
Okay, I thought about it some more and agree we should remove the logging stuff. It is confusing :)
Committed along with my PHP fatal fix: https://github.com/backdrop-contrib/smtp/commit/8526663e1f847feeecc0ea40b8f86ee8e7c33386
This is a follow-up to #4...
With https://github.com/backdrop-contrib/smtp/pull/6 merged, we check if the dblog module is enabled and if so (plus if the user has access to view logs), then we print the "check the logs" part of the email body as plain text instead of a link. This still prompts the user to check their logs, but if syslog.module is not enabled, there will be no logs to check. Right? Shouldn't we in that case skip printing the "You may want to check the logs." message entirely? ...either that or print a different message prompting the email recipient to enable at least one of the available logging modules first.
BTW (separate issue, but let me ask first) ...the
&& user_access('access site reports')
part in https://github.com/backdrop-contrib/smtp/blob/1.x-1.x/smtp.admin.inc#L144 does it check against the currently logged in user or the user to whom the email is being sent to?