{"action":"created","issue":{"url":"https://api.github.com/repos/mybb/mybb/issues/2928","repository_url":"https://api.github.com/repos/mybb/mybb","labels_url":"https://api.github.com/repos/mybb/mybb/issues/2928/labels{/name}","comments_url":"https://api.github.com/repos/mybb/mybb/issues/2928/comments","events_url":"https://api.github.com/repos/mybb/mybb/issues/2928/events","html_url":"https://github.com/mybb/mybb/issues/2928","id":278726642,"node_id":"MDU6SXNzdWUyNzg3MjY2NDI=","number":2928,"title":"Context Sensitive Error Pages","user":{"login":"kawaii","id":12242877,"node_id":"MDQ6VXNlcjEyMjQyODc3","avatar_url":"https://avatars1.githubusercontent.com/u/12242877?v=4","gravatar_id":"","url":"https://api.github.com/users/kawaii","html_url":"https://github.com/kawaii","followers_url":"https://api.github.com/users/kawaii/followers","following_url":"https://api.github.com/users/kawaii/following{/other_user}","gists_url":"https://api.github.com/users/kawaii/gists{/gist_id}","starred_url":"https://api.github.com/users/kawaii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kawaii/subscriptions","organizations_url":"https://api.github.com/users/kawaii/orgs","repos_url":"https://api.github.com/users/kawaii/repos","events_url":"https://api.github.com/users/kawaii/events{/privacy}","received_events_url":"https://api.github.com/users/kawaii/received_events","type":"User","site_admin":false},"labels":[{"id":751725810,"node_id":"MDU6TGFiZWw3NTE3MjU4MTA=","url":"https://api.github.com/repos/mybb/mybb/labels/1.10","name":"1.10","color":"33aaee","default":false},{"id":6961150,"node_id":"MDU6TGFiZWw2OTYxMTUw","url":"https://api.github.com/repos/mybb/mybb/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-02T23:16:14Z","updated_at":"2018-06-11T06:19:24Z","closed_at":null,"author_association":"MEMBER","body":"Currently, when a user tries to perform an action for which they do not have the correct usergroup permissions to do, they are greeted by what is possibly the most nondescript and unhelpful error page I could imagine. I think that as part of `1.10` we should aim to include a wider array of error/insufficient error pages which explain in a greater level of detail exactly why the user is unable to perform the action they are attempting. Presenting a user with this (see below), doesn't help anyone.\r\n\r\n![image](https://user-images.githubusercontent.com/12242877/33520591-f723b8ba-d7b5-11e7-8acf-ca80bb9dd55a.png)\r\n\r\nAn error message should be informative and helpful to the user, not cause confusion. I suggested in the community Discord that this quality-of-life improvement could possibly be tied in with #2864. Since we are positive that the minimum PHP version required to use `1.10` will be raised, we would be able to make use of `http_response_code` (introduced in PHP 5.4 as pointed out by @JordanMussi) without needing to be backwards compatible. HTTP status codes can be used for a variety of different occasions such as throwing a 404 when attempting to view a nonexistent thread or a 403 when attempting to view a thread or forum which the user has no permission to do so.\r\n"},"comment":{"url":"https://api.github.com/repos/mybb/mybb/issues/comments/396134025","html_url":"https://github.com/mybb/mybb/issues/2928#issuecomment-396134025","issue_url":"https://api.github.com/repos/mybb/mybb/issues/2928","id":396134025,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjEzNDAyNQ==","user":{"login":"effone","id":21265591,"node_id":"MDQ6VXNlcjIxMjY1NTkx","avatar_url":"https://avatars3.githubusercontent.com/u/21265591?v=4","gravatar_id":"","url":"https://api.github.com/users/effone","html_url":"https://github.com/effone","followers_url":"https://api.github.com/users/effone/followers","following_url":"https://api.github.com/users/effone/following{/other_user}","gists_url":"https://api.github.com/users/effone/gists{/gist_id}","starred_url":"https://api.github.com/users/effone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effone/subscriptions","organizations_url":"https://api.github.com/users/effone/orgs","repos_url":"https://api.github.com/users/effone/repos","events_url":"https://api.github.com/users/effone/events{/privacy}","received_events_url":"https://api.github.com/users/effone/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T06:19:24Z","updated_at":"2018-06-11T06:19:24Z","author_association":"MEMBER","body":"Just to mention here if we at all wanna use `http_response_code()` for the 5.4+ usage its also not completely reliable as PHP is not aware of all the ITFT standard code status or its RFCs and may react strangely replacing the known status code from the same group. For example `http_response_code(521);` gets replaced by \"500 Internal Server Error\".\r\n\r\nWe need a custom function or a maintained library to handle HTTP Responses, IMO, to work with this even considering backward compatibility since 4.1.0 and to work under / detecting PHP-FPM (FastCGI) properly."}}
{"actor":{"display_login":"effone"}}