mirror of
https://github.com/docmost/docmost.git
synced 2026-07-25 21:34:44 +10:00
fix: change permissions object shape
This commit is contained in:
@@ -29,7 +29,7 @@ export default function BasePage() {
|
||||
{base.icon ? `${base.icon} ` : ""}{base.name}
|
||||
</Title>
|
||||
)}
|
||||
<BaseView pageId={pageId} editable={hasBases && (base?.canEdit ?? false)} />
|
||||
<BaseView pageId={pageId} editable={hasBases && (base?.permissions?.canEdit ?? false)} />
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -246,8 +246,10 @@ export type IBase = {
|
||||
views: IBaseView[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
/** Effective edit permission for the current user (page-restrictions included). */
|
||||
canEdit?: boolean;
|
||||
permissions?: {
|
||||
canEdit: boolean;
|
||||
hasRestriction: boolean;
|
||||
};
|
||||
baseSchemaVersion: number;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user