Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Claims checks need to scope to an account #574

Open
2 tasks
skylar-anderson opened this issue Apr 18, 2016 · 4 comments
Open
2 tasks

Claims checks need to scope to an account #574

skylar-anderson opened this issue Apr 18, 2016 · 4 comments

Comments

@skylar-anderson
Copy link
Contributor

@krallin
Copy link
Contributor

krallin commented Apr 19, 2016

If we start passing multiple properties through the validators, perhaps this would allow us to fix another somewhat annoying bug: right now, when you create an app (or DB), the screen flashes the "handle is already taken" message after you save your app (because your app took the handle).

I'm not entirely sure whether Dashboard updates its representation of the app (or DB, etc.) after saving it, but if that's the case, then perhaps we could have Dashboard send, Resource ID, Resource Handle, and Account ID, and have the claims check only fire an error if the handle is already in use within the account by a resource with a different ID.

@krallin
Copy link
Contributor

krallin commented Apr 19, 2016

We should also be mindful that not everything in Aptible supports having multiple objects with the same handle within one organization (or more specifically: multiple objects with the same handle accessible by the same user)

For example, Dumptruck expects an app handle to be unique, and will feed you logs for the wrong app (if logs work on your stack) because it'll look for the app via its handle. This can be fixed by passing HREFs instead of handles (see this PR for an example: https://github.com/aptible/broadwayjoe/pull/37).

Do we have other tools that make the assumption that handles are unique? cc @fancyremarker

@fancyremarker
Copy link
Member

@krallin: Apart from Dumptruck/BroadwayJoe (and earlier versions of aptible-cli), I don't believe there are client apps that assume global handle uniqueness.

@krallin
Copy link
Contributor

krallin commented Jun 13, 2016

For the record; I fixed this in Dumptruck a little while ago: https://github.com/aptible/dumptruck/pull/14

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants