mirror of
https://github.com/outline/outline.git
synced 2026-12-01 17:32:49 +03:00
Serialize creator on membership response
This commit is contained in:
1 parent
e6924e3b73
commit
e847c2f48b
4 files changed
+24
-16
No files matched your search
@@ -112,19 +112,7 @@ function SharePopover({
|
||||
</CopyToClipboard>
|
||||
</Heading>
|
||||
<DocumentMembersList document={document}>
|
||||
{document.isDraft ? (
|
||||
<Item
|
||||
image={<Avatar model={document.createdBy} />}
|
||||
title={document.createdBy.name}
|
||||
actions={
|
||||
<CollectionAccess tooltip={t("Creator of this draft")}>
|
||||
{t("Can edit")}
|
||||
</CollectionAccess>
|
||||
}
|
||||
border={false}
|
||||
small
|
||||
/>
|
||||
) : collection ? (
|
||||
{collection ? (
|
||||
<>
|
||||
{collection.permission ? (
|
||||
<Item
|
||||
@@ -160,7 +148,19 @@ function SharePopover({
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
) : (
|
||||
<Item
|
||||
image={<Avatar model={document.createdBy} />}
|
||||
title={document.createdBy.name}
|
||||
actions={
|
||||
<CollectionAccess tooltip={t("Created the document")}>
|
||||
{t("Can edit")}
|
||||
</CollectionAccess>
|
||||
}
|
||||
border={false}
|
||||
small
|
||||
/>
|
||||
)}
|
||||
</DocumentMembersList>
|
||||
|
||||
{team.sharing && visible && (
|
||||
|
||||
@@ -25,13 +25,20 @@ class UserMembership extends Model {
|
||||
@Relation(() => Document, { onDelete: "cascade" })
|
||||
document: Document;
|
||||
|
||||
/** The user ID of user who is a member */
|
||||
/** The ID of the user who is a member */
|
||||
userId: string;
|
||||
|
||||
/** The user who is a member */
|
||||
@Relation(() => User, { onDelete: "cascade" })
|
||||
user: User;
|
||||
|
||||
/** The user that created this membership */
|
||||
@Relation(() => User, { onDelete: "null" })
|
||||
createdBy: User;
|
||||
|
||||
/** The ID of the user that created this membership */
|
||||
createdById: string;
|
||||
|
||||
store: UserMembershipsStore;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ export default function presentDocumentMembership(
|
||||
userId: membership.userId,
|
||||
documentId: membership.documentId,
|
||||
permission: membership.permission,
|
||||
createdById: membership.createdById,
|
||||
index: membership.index,
|
||||
};
|
||||
}
|
||||
@@ -260,10 +260,10 @@
|
||||
"Custom link": "Custom link",
|
||||
"Copy public link": "Copy public link",
|
||||
"People with access": "People with access",
|
||||
"Creator of this draft": "Creator of this draft",
|
||||
"Everyone at {{ name }}": "Everyone at {{ name }}",
|
||||
"Can view": "Can view",
|
||||
"Collection members": "Collection members",
|
||||
"Created the document": "Created the document",
|
||||
"Public access": "Public access",
|
||||
"Access inherited from collection": "Access inherited from collection",
|
||||
"Logo": "Logo",
|
||||
|
||||
Reference in new issue
Block a user