-
Notifications
You must be signed in to change notification settings - Fork 74
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
contrib: removal of dependency on Invenio-Groups #19
contrib: removal of dependency on Invenio-Groups #19
Conversation
|
||
db.session.add(user) | ||
current_user.reload() | ||
res['groups'] = fetch_groups(res['Group']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed? Why is necessary to parse the groups and remove some of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because some of them should not be managed by Invenio.
8904cba
to
0a72a40
Compare
IMHO we can |
@@ -159,6 +160,9 @@ | |||
REMOTE_APP_RESOURCE_SCHEMA = "http://schemas.xmlsoap.org/claims/" | |||
|
|||
|
|||
oauth_cern_response_received = signal('oauth-cern-response-received') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the signal should be defined in a signals.py
file.
Also it's better to define a generic signal oauth-reposnse-received
and use the remote app as sender.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jirikuncar From handlers.py
there is no access to get all the resources of the user. Should the methods account_info
and account_setup
return a dictionary with all the fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this signal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JavierDelgadoFernandez please remove this signal. It is not needed anymore.
Please cherry-pick from https://github.com/jirikuncar/invenio-oauthclient/tree/signals |
8466596
to
93a11d4
Compare
Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
93a11d4
to
9206218
Compare
@jirikuncar Ping. |
handlers['setup'](token, response) | ||
account_setup = handlers['setup'](token, response) | ||
account_setup_received.send( | ||
remote, response=response, account_setup=account_setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might want to pass also token
9206218
to
e559bfe
Compare
@jirikuncar Done. |
@@ -119,9 +120,13 @@ | |||
)) | |||
|
|||
|
|||
oauth_orcid_response_received = signal('oauth-orcid-response-received') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this signal
e559bfe
to
4fd10f6
Compare
@jirikuncar Done. |
4fd10f6
to
79710a3
Compare
@jirikuncar Done. |
|
||
db.session.add(user) | ||
current_user.reload() | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pass
Then we can |
* Removes the dependency on Invenio-Groups reducing the number of fields parsed inside CERN or ORCID modules and sending the response to a subscribable signal. (closes inveniosoftware#18) Signed-off-by: Javier Delgado <javier.delgado.fernandez@cern.ch>
79710a3
to
1bc2fd2
Compare
@jirikuncar Done. |
parsed inside CERN or ORCID modules and sending the response to a
subscribable signal. (closes contrib: remove strong dependency on Invenio-Groups #18)
Signed-off-by: Javier Delgado javier.delgado.fernandez@cern.ch