Skip to content
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

Allow to pass modelName #5

Open
Globegitter opened this issue Mar 1, 2015 · 1 comment
Open

Allow to pass modelName #5

Globegitter opened this issue Mar 1, 2015 · 1 comment

Comments

@Globegitter
Copy link
Member

So instead of a fixed 'user' model, one can pass sane install sane-auth customer or whatever to consistently have the customer model being used.

The full API in the sane addon-system for that is still WIP and this issue will help implement that.

@jamemackson
Copy link

@Globegitter are you thinking that in this example, the customer model already exists or would be created? I think expecting/requiring this might be a nice way to approach this.

Ultimately the ability to define the model and/or attributes when setting this up would be great. Supporting the field:type syntax used for the resource/api generation might be ideal. The challenge I see though with that is knowing what fields the user is defining for username and password. Maybe defining these via explicit parameters to the command would solve this.

Thinking a syntax like this:
sane install sane-auth customer firstName:string lastName:string --un=email --pwd=secretField

And this way we would also know the fields we needed to dynamically generate the registration routes action handler for createUser...

or if the model already exists, we would just omit the fields but still identify the un/pwd fields
sane install sane-auth customer --un=email --pwd=secretField
In this scenario we'd have to parse out the required fields if we wanted to include these in the createUser handler. I guess documenting that the user would have to manually update this might be ok though depending on how big of a task that parsing is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants