radiks
                                
                                 radiks copied to clipboard
                                
                                    radiks copied to clipboard
                            
                            
                            
                        Adds model config to validate usernames
This adds a static property to Model called validateUsername. By default, this is false. If true, then Radiks will save the current user's username when saving data. This is really all that is needed to send to Radiks-server, which does all of the actual validation.
cc @moxiegirl, @pradel , @friedger who have expressed interest here.
See https://github.com/blockstack-radiks/radiks-server/pull/19 for the server code.
I have published a beta version for testing - 0.3.0-beta.1
TODO:
- [ ] Include validateUsernameon theBlockstackUserRadiks model by default
Using publish-data should be good practice anyway if the app is sharing data with other users.
What about usernames that are transferred? The model will be associated with the username. Users should be aware of this if they transfer their username.
Would the same apply if you change your storage? The Gaia url will also change no?
If you change your Gaia URL, then the profile.json would also get updated, so future writes would still work. If we have some migration tool in the browser at some point, we should maybe have a way to save your previous Gaia URLs.
Another option is to only check the address portion of the Gaia URL, not the domain. That would work pretty well if you changed hubs.
Sent with GitHawk
@friedger if usernames are transferred, then new writes will no longer work. It might make sense to have some cron job that re-validates old data to see if the username still matches, but I think that’s outside of the scope of this PR.
Sent with GitHawk