As for the other modules a REST API will be needed here.
The main features would be:
searching/listing users
getting a user's information
updating a user's information
searching roles
creating roles
assigning roles to users or unassigning them.
It would also need a shortcut URI for the currently authenticated user.
There is however one question. Do we want this in invenio-accounts or do we create an API for both invenio-accounts and invenio-userprofiles at the same time? Not being able to search users by name would be a strange limitation.
Regarding B2Share, we will need a search/suggest of users and roles based on their names. I see at least one use case where this would be useful: admin interface.
This would imply that we need to have a combined REST API for invenio-accounts and invenio-userprofile.
The cons of this approach is that other people might want to use a custom profile module.
Regarding Accounts/UserProfiles:
This might be taken care of by serialisers and loaders, since usually the profile can be accessed from the user model. Also we can launch an Invenio-Accounts-REST which depends on both accounts and user profiles.
@nharraud commented on Fri Sep 02 2016
As for the other modules a REST API will be needed here.
The main features would be:
It would also need a shortcut URI for the currently authenticated user.
There is however one question. Do we want this in invenio-accounts or do we create an API for both invenio-accounts and invenio-userprofiles at the same time? Not being able to search users by name would be a strange limitation.
@inveniosoftware/triagers
@nharraud commented on Fri Sep 02 2016
Needed for #137
@lnielsen commented on Fri Sep 02 2016
would need careful though about oauth2 scopes as well
@nharraud commented on Mon Sep 05 2016
Regarding B2Share, we will need a search/suggest of users and roles based on their names. I see at least one use case where this would be useful: admin interface.
This would imply that we need to have a combined REST API for invenio-accounts and invenio-userprofile. The cons of this approach is that other people might want to use a custom profile module.
@lnielsen commented on Mon Sep 05 2016
It's useful to have an endpoint for the current authenticated user as well similar to GitHub: https://developer.github.com/v3/users/#get-the-authenticated-user.
Also we might be forward looking an allow support for multiple email addresses: https://developer.github.com/v3/users/emails/
Regarding Accounts/UserProfiles: This might be taken care of by serialisers and loaders, since usually the profile can be accessed from the user model. Also we can launch an Invenio-Accounts-REST which depends on both accounts and user profiles.
@PaulinaLach commented on Mon Sep 05 2016
Here is my suggestion of list of the endpoints:
GET /users
GET /users?q=sth
GET /users/<id>
PATCH /users/<id>
POST /users
GET /roles?q=sth
POST /roles
DELETE /roles/<role_id>
PUT /users/<user_id>/roles/<role_id>
DELETE /users/<user_id>/roles/<role_id>
Is it ok for everyone? Or do you have any suggestions?
@jirikuncar commented on Mon Sep 05 2016
It's needed also for Invenio-Circulation (https://github.com/inveniosoftware/invenio-circulation/pull/38 cc @mvesper).
Can we create Invenio-Accounts-REST?