feat(storage): configure storage API with default access policies during initialization
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
import { configureRouter, registerFeatureRoutes, clearRouterConfig, clearFeatureRoutes } from '@zen/core/api';
|
||||
import { validateSession } from '../../features/auth/lib/session.js';
|
||||
import { routes as authRoutes } from '../../features/auth/api.js';
|
||||
import { configureStorageApi } from '@zen/core/storage';
|
||||
import { done, warn } from './logger.js';
|
||||
|
||||
const ZEN_INIT_KEY = Symbol.for('__ZEN_INITIALIZED__');
|
||||
@@ -36,6 +37,13 @@ export async function initializeZen() {
|
||||
configureRouter({ resolveSession: validateSession });
|
||||
registerFeatureRoutes(authRoutes);
|
||||
|
||||
configureStorageApi({
|
||||
getPublicPrefixes: () => [],
|
||||
getAccessPolicies: () => [
|
||||
{ prefix: 'users', type: 'owner' },
|
||||
],
|
||||
});
|
||||
|
||||
done('ZEN: ready');
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user