-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(users) Separate admin routes and cleanup #1641
base: master
Are you sure you want to change the base?
Conversation
Wuntenn
commented
Nov 16, 2016
- removed unused users.authorization.server.controller
- moved admin routes to admin path
- removed unused users.authorization.server.controller - moved admin routes to admin path
@Wuntenn The idea of adding admin to these types of routes was discussed at some length here: The discussion picks back up again (after the PR was merged): #713 (comment) I'll spend some time reviewing that thread again, and come back with my thoughts. However, I'm leaning toward not wanting |
I want to add a singleton resource to users which works via a route like: Now Looking at that thread, maybe it's an ordering issue, however I doubt I would have discovered this because I followed the convention in place and gave After digging through the routes I noticed (again) that the userById was redundant and that only admin used anything like it. The
As we don't really need to look up the user. It a waste of a param. Only the admin will ever look up a user. I liked the idea of being able to user the ACL* with all user user routes and the idea of keeping the apis separate as a security precaution. Admin seemed harmless and like the direction being taken on the front-end. I'm flexible though, maybe I'll have to go with the above route style...
I'll check this again. Maybe it was something I did. |
This boilerplate doesn't, but an app using this boilerplate might. ;-) Sorry but adding This also restricts to one role only ("admin"). Some app might need to have "moderators" or other admin-like roles. While security precaution is a valid point, I recon it's a matter of having proper testing, really. So I'd vote not merging this. |
Oh and totally sorry if I'm repeating points already discussed elsewhere, no time to even skim through that discussion. ;-) Cheers! |
@Wuntenn I can't recall the depth of the discussion, in that thread I referenced, so I may be repeating as well :) I think the crux of the issue here is the non-standard User routes. They aren't using the It may seem redundant to include Daron, would you be interested in submitting a new PR to "fix" these non-standard User routes? See #1608 (comment), for more or less my current view on the matter. |