-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't list users as a normal user (graph api) #7782
Comments
This is an admin route. Needs admin permissions. |
@micbar how should a user then be able to share? For sharing a user needs ids of other user/groups |
Good question. @butonic we need a user search like on ocs, where you can start typing and get users/groups back. |
And then we need to change |
@micbar get |
Yes, from the usage (in the PHP SDK) that would be preferable, any user can query the endpoint, some get more some get less data. |
Basic plan:
(*) Based on the user model in the libre-graph-api-go repo, I think we can use just the Note that queries, filters and other stuff will remain without changes. In particular, regular users might still filter users by specific roles, or list users from any group (we'll likely need to implement additional restrictions to prevent this) |
We need to make sure that we get this in before friday (feature freeze). |
I've uploaded code into the "normal_user_list" branch. Code changes can be seen in https://github.com/owncloud/ocis/compare/normal_user_list That should cover points 1 and 2. Note that specific filters for the regular users still needs to be implemented. Right now, any user can list every user in the system. |
@jvillafanez I think you plan looks great just a few comments:
Instead of just checking for the admin role I think it would be better to check if the user's role assigment has the Also we should restrict "normal" user to queries that contain a
It's not implemented. But I don't think we need it currently.
☝️ This is the part we need IMO.
👍
All of this should stay limited to users with the |
Unless I've missed something, it should be done:
I'll try to add some tests and make the "official" PR. |
Yes. That is the minimal stuff that's needed for the sharing NG story. We can think about how we add all the other bells and whistles later. |
done. |
Describe the bug
when listing the users as a normal user like
marie
it gives401
https://owncloud.dev/libre-graph-api/#/users/ListUsers
Steps to reproduce
curl -k -v "https://localhost:9200/graph/v1.0/users" -u marie:radioactivity
response:
Expected behavior
marie
should get the list of usersActual behavior
marie
gets deniedSetup
Please describe how you started the server and provide a list of relevant environment variables or configuration files.
OCIS_XXX=master
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: