Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1151

I get redirected if I access a report which does not exist or I have no access to

    Details

    • Type: Task
    • Status: Done
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0-alpha2, 2.1.0
    • Component/s: frontend
    • Labels:
      None

      Description

      • when:
      • then:
        • I see just a loading indication, but nothing ever happens
      • expected:
        • I see an error message "You tried to access a report that does not exist. Please access the reports page to see a list with all available reports!" for unknown reports
        • I see an error message "You are not authorized to see the report. Please access the reports page to see a list with all available reports!" for unauthorized reports
        • I see a link to the reports page
      • such that:
        • the user knows what the actual problem is and why he cannot access a certain report.
        • the user gets instructions where to find the report he wants to access.

        Issue Links

          Activity

          Hide
          johannes.heinemann Johannes Heinemann added a comment - - edited

          Review hints:

          • It works pretty nicely. Well done!
          • service.js: the loadDashboard and loadSingleReport methods should not return an error code when the result is not a valid dashboard/report. This is counterintuitive. Instead you should handle the error handling in the respective class where the call is being made. This makes it also transparent for the developer who reads the code.
          • This was not part of your ticket, but I think it makes sense to implement it here as well: when the user is not authorized (status code 403), he should also see an error message. I adjusted the ticket description for that already.
          • Dashboard.js: there is a comment in line 439 that can be removed
          • Dashboard.js: componentDidMount() should not set the the state twice. You can just use a local variable to achieve that.
          Show
          johannes.heinemann Johannes Heinemann added a comment - - edited Review hints: It works pretty nicely. Well done! service.js: the loadDashboard and loadSingleReport methods should not return an error code when the result is not a valid dashboard/report. This is counterintuitive. Instead you should handle the error handling in the respective class where the call is being made. This makes it also transparent for the developer who reads the code. This was not part of your ticket, but I think it makes sense to implement it here as well: when the user is not authorized (status code 403), he should also see an error message. I adjusted the ticket description for that already. Dashboard.js: there is a comment in line 439 that can be removed Dashboard.js: componentDidMount() should not set the the state twice. You can just use a local variable to achieve that.
          Hide
          johannes.heinemann Johannes Heinemann added a comment -

          I like how you resolved the error handling

          Show
          johannes.heinemann Johannes Heinemann added a comment - I like how you resolved the error handling

            People

            • Assignee:
              Unassigned
              Reporter:
              johannes.heinemann Johannes Heinemann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: