[
https://issues.apache.org/jira/browse/TC-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971541#comment-15971541
]
Jeremy Mitchell commented on TC-217:
------------------------------------
Are we talking specifically about self-service of tenants in this Jira? If so
here are my thoughts. Let's follow this example:
- Disney <-- I have the Disney tenant assigned to my user
-- ABC
--- ABC Family
-- ESPN
1. I don't really understand the need to "CRUD sub tenants below their tenant
level or below any sub-tenant level they choose". Currently you CAN already do
that with:
POST /api/1.2/tenants <-- when you create a tenant you have to specify the
parentId. and that parentId has to be in the user's tenant chain. so i could
specify the parent id = disney, abc, abc family or espn. If I specify another
parentId, the api returns 403 FORBIDDEN
2. You can already get a list of the current user's tenants with:
GET api/1.2/tenants <-- this should return a flat list (array) of tenants
inside the user's tenant chain. It would be nice if this list was sorted to
reflect the hierarchy. for example:
The result of my user's GET api/1.2/tenants would contain this and be in this
order:
Disney
ABC
ABC Family
ESPN
3. I do think an api to fetch "descendents" or subtenants of a tenant makes
sense. for example:
GET api/1.2/tenants/:id/subtenants <-- this contains a list of descendant
tenants in an order that reflects the hierarchy.
4. I don't like the idea of having defaults for anything. If you want to create
a tenant. you have to specify a parentId. No defaulting.
5. I do think GET users/:id/tenants is a good idea.
6. To reiterate the ordering, i do think it will prove valuable to order all
flat tenants lists to reflect the hierarcy. I'm thinking about the UI here. If
i want to show the user's tenants, it's alot easier to ready if they are
organized.
> Self Service - CRUD Sub Tenant
> ------------------------------
>
> Key: TC-217
> URL: https://issues.apache.org/jira/browse/TC-217
> Project: Traffic Control
> Issue Type: New Feature
> Components: Traffic Ops, Traffic Ops API
> Reporter: Ashish Timilsina
>
> Allow users to CRUD sub tenants below their tenant level or below any
> sub-tenant level they choose. Default would be directly below the current
> tenant value.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)