Closed oscgonfer closed 1 year ago
Hey Oscar, Apologies, i've forgotten the expected behaviour here!
Currently it'd be:
Role mask | Role |
---|---|
0 | citizen |
1 | citizen |
2 | researcher |
3 | citizen |
4 | citizen |
5 | admin |
6 etc | admin |
I'm guessing an easy choice to 'rationalise' it would be: | Role mask | Role |
---|---|---|
0 | citizen | |
1 | citizen | |
2 | researcher | |
3 | researcher | |
4 | researcher | |
5 | admin | |
6 etc | admin |
is that what you wanted to happen?
Hi! Yes, the second table would be the correct one. Note for the future: we will have to review this table. We literally do not need so many categories, specially above admin, but functionality-wise this works.
ok great, I'll have a look at that now!
As checked by @timcowlishaw , wt seems we currently do not set the role properly based on this function!
https://github.com/fablabbcn/smartcitizen-api/blob/fca48fe8967fd9ad4153889c5296f220aee1c0c5/app/models/user.rb#L108-L111