We're Hiring!

Mattermost, Inc.

Since last update to 5.26 in error log: You do not have the appropriate permissions



since I updated from 5.24 to 5.26 I get many errors (only the same):

{“level”:“error”,“ts”:1597831936.4974263,“caller”:“mlog/log.go:190”,“msg”:“You do not have the appropriate permissions.”,“path”:"/api/v4/warn_metrics/status",“request_id”:“j7hncqesub8sjfpqsr7xca1ate”,“ip_addr”:“xx.xx.xx.xx”,“user_id”:“xxxxx”,“method”:“GET”,“err_where”:“Permissions”,“http_code”:403,“err_details”:“userId=xxxxx, permission=manage_system”}

Steps to reproduce

after login or opening the web front

Expected behavior

Observed behavior

the Mattermost is working, but where comes this error messages?

Best regards and thanks!

Hello, @dominikde

I noticed that the warn_metrics API endpoint was added in Mattermost 5.26:

  • Added GET api/v4/warn_metrics/status API endpoint to get the status of a set of metrics (enabled or disabled) from the Systems table.
  • Added POST api/v4/warn_metrics/ack/:warn_metric_id API endpoint to acknowldge a warning for the warn_metric_id metric crossing a threshold (or some similar condition being fulfilled).

While the error might not cause any issues with Mattermost for now, I will go through the team to understand it better. You mentioned “after login or opening the web front” but the sentence seems incomplete. Can you please provide more details on the steps to reproduce so I can see if it is also replicable on my end? Thanks.

Hi again, @dominikde

Just received the update that the error is harmless though we should probably avoid making the API call if the user doesn’t have the necessary permissions. This is related to the following PR:

Hope it helps to clarify the concern that you have here.