Closed DzmitryNikitsin closed 12 years ago
I think this is a better solution, since it uses a data structure that prevents dupes without clobbering values already in the database:
https://github.com/songkick/oauth2-provider/commit/df7b275a680005158029c7acb87262e82d699640
This pull request completely overwrites the stored set of scopes with another one, which is not what we want. The effect of #grant_access
should be additive, so it's easy to provide additional permissions to a client rather than presenting all the permissions a user has already granted.
Closing this since we've fixed the long-string problem while preserving existing semantics.
When you do grant_access! with scopes we always add new scope to old ones, it will cause very long string of equal scopes as a result. Instead of add replace scope each time.