cozy / cozy-proxy

This repository was part of CozyV2 which has been deprecated - Cozy authentication and routing layer
https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3
GNU Affero General Public License v3.0
26 stars 31 forks source link

Accounts step depends on the presence of the MyAccounts application #353

Closed goldoraf closed 7 years ago

goldoraf commented 7 years ago

@gregorylegarec It works, but I'm not a big fan of the global ENV variable in the tests. Another approach would be to modify the isActive method so that it takes a second 'installedApps' argument.

gregorylegarec commented 7 years ago

@goldoraf Thanks for your work and sorry for review delay.

Yes, It totally agree with you. What do you think about adding theapps property in our user object ? It could be done here: https://github.com/cozy/cozy-proxy/blob/development/client/app/application.coffee#L83

user = {
        username: ENV.username,
        hasValidInfos: ENV.hasValidInfos
        apps: ENV.apps
    }

user is then passed to onboarding and internally passed as parameter for step.fetchUser method, so only our Application rely on the ENV variable ?

goldoraf commented 7 years ago

@gregorylegarec deal! :+1:

gregorylegarec commented 7 years ago

Great work @goldoraf, thank you !