Closed skylar-anderson closed 8 years ago
I wrapped up this PR early in order to make it in time for Engineering Show & Tell, but ideally we'd use this same model on Log Drains and Certificates as well.
This PR hides the create button for these users.
Do you think we could show them a message explaining they don't have permission? In my experience just hiding the button when a user is missing permissions doesn't necessarily make it clear how they should go about resolving this problem.
@krallin - Yeah that's a good point. I'll change that behavior.
This PR updates the apps#create and databases#create route to actually be modal components.
Sadly @blakepettersson this removes the current
list-databases
component and the need for the newlist-apps
component as you no longer need to bubble up theforceRedirect
action.Further, this PR fixes the issue of a user lacking
manage
permissions on an environment being redirected to thenew
route for apps/databases. This is confusing as they can't actually create any new resources and they'd just get an error when attempting to create. This PR hides the create button for these users.This also changes the UX for empty index pages. Rather than redirecting immediately to the
new
route, you now get a simple message with a button. Images below.Empty Index UI
Create DB UI