-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
uncompleted documentation cookbook/security/entity_provider.html #2756
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
Comments
@gondo I know that you've fixed many of these issues in #2765, but I'm not sure which issues have been fixed and which have not. I've changed your original questions into checkmark boxes. Can you "check off" the items that have already been fixed? Then we can work through any remaining items. Thanks! |
hi, pretty much everything was addressed in my pull request. however: |
About 3, I do think that we should at least link to other places in the documentation that show you how you would actually create users. It does seem a little incomplete that you can set all of this up, but that without any data (users, roles) in the database, you can't really do anything. About 7, which later tutorial are you talking about that mentions Group? I don't see anything else (but let me know), so I don't think this is an issue. I actually like your change from Group to Role. We do sometimes use "Group" in the Symfony world, but usually in those cases, a "Group" represents many roles, not just one role. You can see this idea, for example, in the FOSUserBundle. So, I liked your change to Role. |
|
So the only thing to fix now is (3). |
@gondo thanks for your great work improving this tutorial! I have another suggestion. Some user asked on IRC what is or where is the User bundle that mentions the tutorial. Specifically, this is the phrase that should be improved:
Something like this would be enough (obviously with a proper English wording):
|
And there's another problem. It assumes you have a I think we need to actually guide people (not necessarily here, but point to other links) on how to create their bundle and generate the entity if they don't have one. |
This issue seems to have been solved in the merged #2765 PR. If that's true, should we close it? |
I'll close this - I've almost certainly checked off the last item with #5083 Thanks! |
…ty (weaverryan) This PR was merged into the 2.3 branch. Discussion ---------- Proofreading and updating entity_provider for readability | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | all | Fixed tickets | #2756 Hi guys! I wanted to close #2756, and when I started looking into things, there were a bunch of changes I wanted to make for readability. I think it's good, but of course, errors are likely :). Thanks! Commits ------- 0bb82c6 Fixing bad link name 7153f3b Many fixes thanks to stof, WouterJ, xabbuh and dupuchba 768f7cc Proofreading and updating entity_provider for readability
This tutorial needs more love. Here is a list of few things what i found confusing or incorrect:
select * from user;
create table users
description. (this can be guessed by putting together information from annotations from user class and provided output of select query, but why so complicated?)you can still authenticate with maxime
- this is confusing, as it is the first time that somemaxime
is mentioned. missing password formaxime
and missing reference to when this authentification should be tried for the first time. also this would not work because user class is referencingUserRepository
in annotation, butUserRepository
was not yet defined. (it will be later in the tutorial)create table acme_groups
declaration.Group
should be renamed toRole
to avoid unnecessary confusion, and it should be declared asclass Role implements RoleInterface
php app/console doctrine:generate:entities Acme/UserBundle
(this does it for both User and Group as per http://symfony.com/doc/current/book/doctrine.html#generating-getters-and-setters )select * from groups
is providedQuestion:
how should the user role be saved in the
groups
table?this is my users table
d033e22ae348aeb5660fc2140aec35850c4da997
and this is my current groups table:
but when i login as admin/admin (yes admin is the correct password) the user role on return is empty.
Answer
ok i've noticed that after running table doctrine:generate:entities there is one more table created what mapps user to the role.
The text was updated successfully, but these errors were encountered: