mirror of
https://github.com/traberph/short.git
synced 2026-11-22 22:55:12 +00:00
Separate admins' own content from managing other users
- Short links, Link pages and Overview now show only the admin's own namespace and root; other users' content moved to Administration - Administration lists users with their link/page/click counts; each opens /~/admin/users/<name> with that user's pages and links and lets admins create content in their namespace - other users' pages open under /~/admin/users/<name>/…, keep the Administration section active and link back to the user - one PageTable component for all lists, so search and the namespace filter (All / mine / Root, admins only) behave the same everywhere - the create dialog offers admins only their own namespace and root; the existing-link picker groups links by namespace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,8 +15,12 @@ function sectionOf(route: Route): Section | null {
|
||||
case "tokens":
|
||||
case "admin":
|
||||
return route.name;
|
||||
case "adminUser":
|
||||
return "admin";
|
||||
case "list":
|
||||
case "detail":
|
||||
// Other users' pages are opened from Administration and stay in that section.
|
||||
if (route.name === "detail" && route.owner) return "admin";
|
||||
return route.kind === "redirect" ? "links" : "pages";
|
||||
default:
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user