A user was created by accident with broken permissions in the form of:
{"teacher":"/some-course-slug"} (with missing first part of slug)
Trying to fetch this user with locate! in console to repair their permissions resulted in
Mumukit::Auth::InvalidSlugFormatError (Invalid slug: /some-course-slug. It must be in first/second format) (This of course means querying through api was broken too)
Ideally user object should not fail to created on fetch in order to make fixing permissions easier (and even further, it should fail to save when permissions are broken)
A user was created by accident with broken permissions in the form of:
{"teacher":"/some-course-slug"}
(with missing first part of slug)Trying to fetch this user with
locate!
in console to repair their permissions resulted inMumukit::Auth::InvalidSlugFormatError (Invalid slug: /some-course-slug. It must be in first/second format)
(This of course means querying through api was broken too)Ideally user object should not fail to created on fetch in order to make fixing permissions easier (and even further, it should fail to save when permissions are broken)