This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Provide a way to query current user roles #111
Comments
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 19, 2016
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 19, 2016
Tasks
|
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 22, 2016
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 22, 2016
Ref. SkygearIO#111 This commit also aligns the returning data format of `me` handler with `auth:*` handlers
ben181231
pushed a commit
to ben181231/skygear-SDK-JS
that referenced
this issue
Aug 22, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-JS
that referenced
this issue
Aug 22, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-Android
that referenced
this issue
Aug 22, 2016
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 22, 2016
ben181231
pushed a commit
to ben181231/skygear-server
that referenced
this issue
Aug 22, 2016
rickmak
added a commit
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-iOS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-iOS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-iOS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-iOS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-iOS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-JS
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-SDK-Android
that referenced
this issue
Aug 23, 2016
ben181231
pushed a commit
to ben181231/skygear-doc
that referenced
this issue
Aug 23, 2016
rickmak
added a commit
to SkygearIO/skygear-SDK-JS
that referenced
this issue
Aug 24, 2016
rickmak
added a commit
to SkygearIO/skygear-SDK-Android
that referenced
this issue
Aug 24, 2016
rickmak
added a commit
to SkygearIO/skygear-SDK-iOS
that referenced
this issue
Aug 24, 2016
ben181231
pushed a commit
to ben181231/skygear-doc
that referenced
this issue
Aug 25, 2016
bensonby
pushed a commit
to SkygearIO/skygear-doc
that referenced
this issue
Aug 25, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Unable to get currentUser's roles when I logged in as non-Admin user. Would please advise?
Expected Results
Current user can query his own roles by using
user:query
.Actual Results
After I logged in as an Admin user, I can:
• run getUsersByEmail on currentUser's email
• run getUsersByEmail on other users' emails
=> It suits my needs when I logged in as Admin.
But after I logged in as an non-Admin user, I cannot:
• run getUsersByEmail on currentUser's email
• run getUsersByEmail on other users' emails
The response says:
{"error":{"name":"PermissionDenied","code":102,"message":"No permission to query user"}}
with 403 status code.Proposed solution
Instead of introducing complex access control to
user:query
. I would suggest provide an interfaceme
that will return the current user auth data n and user record. It can be also act as an endpoint that validate the current access token validity before making others API call. In SDK, provided respective API.For JS, I propose:
Also
auth:login
will provided the user roles as inme
too.The text was updated successfully, but these errors were encountered: