-
Notifications
You must be signed in to change notification settings - Fork 0
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
Approach discussion for user module #2
Comments
@kartik-v I'm 100% in. I will need a lot of guidance from you since I have not done this before, so please don't be shy about telling me what I need to do and when. |
Ok, looks fine for me. |
RBAC and e-mail is fine, but I am not very experienced in Unit Tests. Von meinem iPhone gesendet
|
@schmunk42 no problems... I am bad at unit tests as well... and hence was looking for help here @evercode1 would you be able to contribute in unit tests (we may not require documentation effort until we reach into an advanced coding stage)... or is anyone else better in carrying out tests? Will need confirmation from @nineinchnick and we can start then... I suppose @nineinchnick and @robregonm can put more inputs on the user authentication piece since they have already coded it in their modules. I personally will try to come up with a initial draft of Module Design and everyone can chip in... |
@kartik-v The short version: I've never done any unit tests, my fear is I would drag down the timeline learning from scratch. The longer version :) Also, I looked at your docs for your existing social module and they are very impressive. The reason I looked is I wanted to see what a good example looks like. I asked myself if I could do as good of a job on it and then I realized, in order to write docs correctly, one has to have full command of the code. This is a fairly deep extension that reaches into a lot of complex areas or at least they seem complex to me because of my level of experience. The one thing I think I can bring to this is a beginner's perspective, which would help flush out what beginners might stumble over. Although I'm just a beginner programmer, I have a more advanced perspective on the industry which I've been a part of for 15 years. I think this social extension is very important to Yii 2 and to the people who will want to use it. Having fully researched php frameworks, inlcuding Symfony and Laravel, I concluded Yii and especially Yii 2 was the best platform by far. I would love to contribute to this in any way I can. If you want me to start to learn unit testing, I will do it. Just point me in the right direction... |
Nobody likes to do unit tests 😄 I can do social, I did recently did an integration with Paypal using OAuth 2.0 and I tested Facebook on my demo site, I got the main scenarios covered. |
Worked on an initial specification for the yii2-user Module. Kindly have a relook and let's finalize these configuration parameters. |
@kartik-v Looks pretty sharp so far. If possible we may even simplify a few things, but we'll see. |
Few more settings updated in the the yii2-user Module. Various small modifications have been incorporated: i.e. the password reset key settings, form view settings, global widget settings for each form that will be also made available as a widget (as a plugin into views). |
Do we really need the ability to override each view? Can't themes or setting view path be used for that? |
Yes, views can be overridden with themes/view path as you said - this is the normal default. So we may not need configuration to override a view. In addition, I had proposed separate widgets for each of those |
Wouldn't such widgets have too many options? Even if there are only two inputs they need to have labels, error messages etc. Isn't a partial view simpler? |
Not sure there should be many options (unless we want them to). We pick most of these information from the model attributes. Any labels/messages/hints should be translateable. This should work for most use cases. Think of it as if you have these prebuilt widgets, you can easily plug them anywhere in your layout without resorting to or recreating the entire view:
Inspite of all this, If the developer still feels this is not enough, he can entirely make his own view/layout and set it in the view map. |
prebuilt widgets such as these would be intuitive and easy to work with, similar to Kartik's exsiting social module. Very easy to implement and understand... |
Sample use cases (which many can benefit from)
A widget is easier to control (than renderPartial view). We assume bootstrap theme as default (like Yii) and can offer bootstrap styling options (like vertical, horizontal, or inline forms, and basic additional HTML attributes/options for styling). In fact we can reuse each widget code and embed in our default views. |
This would be very effective because the developer would have many ways to encourage social login throughout the site with simple widgets, and not just a single method. With the widgets, a developer could quickly play with the options to determine what is best for their site. I think developers would love this, I certainly would. |
Updated DESIGN, Module Specs, and an Initial Stab at the User Model. The model needs more refining and thought to finalize (need to add all scenarios and other validations). I have kept only 4 user statuses as of now (removed confirmed status - simply because it makes less sense when we have a social auth system which will automatically activate the user on login). @robregonm and @nineinchnick - once we finalize the models -- can you suggest and include the IdentityInterfaces and the related validations. |
@schmunk42 can you have a look and suggest on the ROLE column design for a simple RBAC scenario... and anything else to do for emails/templates. |
Included a draft for all models, mysql script, and the IdentityInterface empty skeleton in components. You have been given access to do a git pull and push directly to the yii2-user repo directly. I have also added in a LoginForm model which is relatively simple and is more or less complete. The social auth will need to be appended into the login form separately. |
An initial take on SOD (of course we will jump into help each other anyway) - let know
The text was updated successfully, but these errors were encountered: