-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Tweaked the admin blog post show page #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
should we keep the author name ? |
|
My reasoning was that you can only see your own posts in the backend (of course you can play with the URL parameters and see other posts ... but should we care about that?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 looks much better now!
|
|
||
| {% block main %} | ||
| <h1>{{ post.title }}</h1> | ||
| <p class="text-muted">{{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be displayed in blog index/show as well? #105 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! I totally missed this comment ... and I almost copied your idea here! Yes, we could display that information ... but for the users I'd like to display people names instead of emails (so we might need to add a field in the user entity).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but for the users I'd like to display people names instead of emails (so we might need to add a field in the user entity).
I'm totally agree with that!
if you should only see your own posts, but changing the URL allows to see any post, this looks like a flaw in the security checks of the backend. It should send a 403. We should use proper security rules in the demo. |
|
@stof yes ... but it's a bit tricky. This demo app is a simplified blog, so we made some decisions such as: all posts are public and published, everybody can see all posts (even anonymous users visiting the blog), etc. The only restriction is that posts can only be edited by their authors. |
This PR was squashed before being merged into the master branch (closes #457). Discussion ---------- Add fullName property to User entity Implements #446 Others changes: * Show full author name in all templates (#439 (comment)) * Use "Jane Doe" instead of "Anna" [RFC] ! * Updated fixtures and user commands. | Posts Index | Post Comments | | --- | --- | |  |  | Commits ------- 4f590dd Add fullName property to User entity
This PR was squashed before being merged into the master branch (closes #457). Discussion ---------- Add fullName property to User entity Implements symfony/demo#446 Others changes: * Show full author name in all templates (symfony/demo#439 (comment)) * Use "Jane Doe" instead of "Anna" [RFC] ! * Updated fixtures and user commands. | Posts Index | Post Comments | | --- | --- | |  |  | Commits ------- 4f590dd Add fullName property to User entity
This PR was squashed before being merged into the master branch (closes #457). Discussion ---------- Add fullName property to User entity Implements symfony/demo#446 Others changes: * Show full author name in all templates (symfony/demo#439 (comment)) * Use "Jane Doe" instead of "Anna" [RFC] ! * Updated fixtures and user commands. | Posts Index | Post Comments | | --- | --- | |  |  | Commits ------- 4f590dd Add fullName property to User entity
This PR was squashed before being merged into the master branch (closes #457). Discussion ---------- Add fullName property to User entity Implements symfony/demo#446 Others changes: * Show full author name in all templates (symfony/demo#439 (comment)) * Use "Jane Doe" instead of "Anna" [RFC] ! * Updated fixtures and user commands. | Posts Index | Post Comments | | --- | --- | |  |  | Commits ------- 4f590dd Add fullName property to User entity
And the last PR about tweaking admin pages. This time, the blog post show page (the "author" is gone because you can only see your own blog posts in the backend):