fishtest
fishtest copied to clipboard
Buttons being displayed even without the required permissions
A user who is not logged in or that it doesn't have the required permissions to perform a certaint action shouldn't even be able to see (in my opinion) certain action buttons such as "Stop", "Approve", "Reschedule", "Modify", etc.
This would apply to some inputs too like priority or throughput.
Or at least instead of hiding them, adding the disabled attribute to them would be nice.
In principle you are right but in my experience making such a thing robust requires some care. The typical case to watch out for is this: the user goes to the test page, then goes to the login page, logs in and uses the back button to go back to the test page. Now the buttons have to be adjusted. But the browser will not reload the page by itself.
So we need some JavaScript to query the login status of the user (I am not sure how the login works, cookie?).
Yes logging in sets a cookie. So this is a pure JavaScript issue.
Maybe related, I no longer see if my test has been approved or not. Is this intentional?
This #1233 dropped the "question mark" and "thumb up" icons, tests are divided in proper sections both in home page and user page