Skip to content

Commit

Permalink
Expose Page.author_deleted_or_purged
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jan 14, 2025
1 parent 324ecb8 commit 9030721
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14717,6 +14717,11 @@ export interface components {
PageContentFormat: "markdown" | "html";
/** PageDetails */
PageDetails: {
/**
* Author deleted or purged
* @description Whether the author of this Page has been deleted or purged.
*/
author_deleted_or_purged: boolean;
/**
* Content
* @description Raw text contents of the last page revision (type dependent on content_format).
Expand Down Expand Up @@ -14815,6 +14820,11 @@ export interface components {
};
/** PageSummary */
PageSummary: {
/**
* Author deleted or purged
* @description Whether the author of this Page has been deleted or purged.
*/
author_deleted_or_purged: boolean;
/**
* Create Time
* Format: date-time
Expand Down
6 changes: 6 additions & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10491,6 +10491,7 @@ class Page(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpdateTime):
"deleted",
"username",
"email_hash",
"author_deleted_or_purged",
"create_time",
"update_time",
]
Expand All @@ -10517,6 +10518,11 @@ def username(self):
def email_hash(self):
return md5_hash_str(self.user.email)

# needed to determine how to display page details
@property
def author_deleted_or_purged(self):
return self.user.deleted or self.user.purged


class PageRevision(Base, Dictifiable, RepresentById):
__tablename__ = "page_revision"
Expand Down
5 changes: 5 additions & 0 deletions lib/galaxy/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3788,6 +3788,11 @@ class PageSummary(PageSummaryBase, WithModelClass):
title="Encoded email",
description="The encoded email of the user.",
)
author_deleted_or_purged: bool = Field(
..., # Required
title="Author deleted or purged",
description="Whether the author of this Page has been deleted or purged.",
)
published: bool = Field(
..., # Required
title="Published",
Expand Down

0 comments on commit 9030721

Please sign in to comment.