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

Add Auth/Encryption models #6

Open
Fryguy opened this issue Dec 18, 2018 · 3 comments
Open

Add Auth/Encryption models #6

Fryguy opened this issue Dec 18, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@Fryguy
Copy link
Contributor

Fryguy commented Dec 18, 2018

Password Mixin should probably just go to manageiq-password - See ManageIQ/manageiq-password#6

@Fryguy Fryguy added the enhancement New feature or request label Dec 18, 2018
@Fryguy
Copy link
Contributor Author

Fryguy commented Dec 20, 2018

While this was technically already implemented directly, not every app that mixes in this gem will want this feature. We need to find a way to make models and their migration set opt-in. On option I'm thinking of is to just store the models in subdirectories, then the calling app would need to add those model and migration directories to their app paths. So for example,

  • app/opt_in_models/auth/authentication.rb
  • app/opt_in_models/auth/encryptions.rb
  • db/migrate/opt_in_migrations/auth/20180123123456_add_authentications.rb

Then in the app

config.autoload_paths << ManageIQ::API::Common::Engine.root.join("app/opt_in_models/auth").to_s

and for the migrations something like: https://github.com/ManageIQ/topological_inventory-core/blob/270173af2490089f3f7b30862497dca5d150c7cf/lib/topological_inventory/core/engine.rb#L7-L13

@bdunne @syncrou Thoughts? Maybe we do this for some features like Auth which are optional, but other features like Tenancy we can enforce by just putting stuff in app/models and db/migrate.

@syncrou
Copy link
Contributor

syncrou commented Jan 2, 2019

I like this idea @Fryguy, do you think we would need to set up a procedure for documenting what exactly is opt_in ( other than looking at the opt_in_models directory? ) Most likely just requiring details in the README would be good enough.

@Fryguy
Copy link
Contributor Author

Fryguy commented Jan 3, 2019

Not sure...maybe there can be helper methods, but I haven't thought it through.

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

No branches or pull requests

2 participants