Skip to content

Commit 3b8f2d5

Browse files
authored
Merge pull request #2725 from codecrafters-io/update-draft-view-permission
refactor: clarify variable name for draft visibility
2 parents cf0616c + 2346840 commit 3b8f2d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/controllers/concepts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export default class ConceptsController extends Controller {
3333

3434
get visibleConcepts(): ConceptModel[] {
3535
return this.model.concepts.filter((concept) => {
36-
const canViewDraft = this.currentUser?.isStaff || concept.author === this.currentUser;
36+
const canViewIfDraft = this.currentUser?.isStaff || concept.author === this.currentUser;
3737

38-
return concept.statusIsPublished || (concept.statusIsDraft && canViewDraft);
38+
return concept.statusIsPublished || (concept.statusIsDraft && canViewIfDraft);
3939
});
4040
}
4141

0 commit comments

Comments
 (0)