···1-import { publicClient } from "../config.ts";
2import { buildAtUri } from "../utils/at-uri.ts";
3import { getSlice } from "../lib/api.ts";
4import type { AuthenticatedUser } from "./middleware.ts";
···79 try {
80 const slice = await getSlice(publicClient, sliceUri);
8182- // User has access if they own the slice
83 const hasAccess = context.currentUser.isAuthenticated &&
84- context.currentUser.sub === profileDid;
8586 return {
87 ...context,
···1+import { publicClient, ADMIN_DID } from "../config.ts";
2import { buildAtUri } from "../utils/at-uri.ts";
3import { getSlice } from "../lib/api.ts";
4import type { AuthenticatedUser } from "./middleware.ts";
···79 try {
80 const slice = await getSlice(publicClient, sliceUri);
8182+ // User has access if they own the slice or are an admin
83 const hasAccess = context.currentUser.isAuthenticated &&
84+ (context.currentUser.sub === profileDid || context.currentUser.sub === ADMIN_DID);
8586 return {
87 ...context,