You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What does the useMasterKey column in the _User class is useful for ? #4669
I have a case (which seems trivial in this kind of dev) where I need to edit others users while one of my users is logged in as admin. I bypassed the issue by using a cloud function and checking by-hand if the user has the right role to edit another one.
By default in the _User class there exists a useMasterKey column. I guessed that this column could eventually be set only by using the masterkey and then the user would be able to CRUD on any object and behind the hood it would use the masterkey but it seems I'm wrong.
So, could you tell me what does this column is useful for ? Is there any dev planned behind it ? Am I using it the wrong way ?
Many thanks @flovilmart. I must be exhausted not being able to think that out by myself...
So, I'm having the right approach by using cloud function for the admin stuff ?
Activity
flovilmart commentedon Mar 22, 2018
There's no
useMasterKeycolumn in the user table you may have created it when saving the user withinstead of
user.save(null, {useMasterKey: true})as per the correct usage of the API.http://parseplatform.org/Parse-SDK-JS/api/v1.11.1/Parse.Object.html#save
somq commentedon Mar 22, 2018
Many thanks @flovilmart. I must be exhausted not being able to think that out by myself...
So, I'm having the right approach by using cloud function for the admin stuff ?
flovilmart commentedon Mar 22, 2018
You should be fine as long as you roles are tightly controled.
somq commentedon Mar 22, 2018
Alright, thanks again for your answer, good evening!