-
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: minor CERN plugin fix #64
Conversation
@omelkonian please amend commit message ( |
@@ -236,7 +236,8 @@ def account_setup(remote, token, resp): | |||
oauth_link_external_id(user, dict(id=external_id, method="cern")) |
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.
Could you also unify usage of quotes to '
(if you start please check the whole file - """
docstrings, '
everything else). Thanks
Although I cannot find any occurence of 'Cern'. |
@omelkonian look to the commit message ... |
@omelkonian please remove merge commit. |
@omelkonian I have checked the diff again and I see that you have replaced the quotes everywhere. It's ok, but it should be in separate commit. Also make sure that you write CERN and not Cern. |
WDYT about |
|
||
groups = fetch_groups(res['Group']) | ||
session['identity.cern_provides'] = [RoleNeed(group) for group in groups] | ||
provides = [UserNeed(user.email)] + \ | ||
[RoleNeed(group + '@cern.ch') for group in groups] |
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.
can you use '{0}@cern.ch'.format(group)
instead? you know ... safety first ;-)
@omelkonian please use labels (FIX, NOTE) only when the message is important for readers of release notes. In the case of first commit you can remove the FIX label as it is just styling ( [1] http://invenio.readthedocs.io/en/latest/technology/git.html#r2-remarks-on-commit-log-messages |
Besides @jirikuncar's comment LGTM |
@omelkonian please keep the branch up-to-date with the master branch and have a look to unresolved comments. |
* Converts strings to be more uniform (i.e. `"""` for docstrings and `'` for everything else). Signed-off-by: Orestis Melkonian <melkon.or@gmail.com>
* Fixes an issue where `g.identity.provides` was populated with only the Cern groups. As access rights can be assigned to single users (i.e. emails), the user's e-mail must also be included in the `g.identity.provides`. * NOTE Appends '@cern.ch' to every CERN group, for uniform formatting. Signed-off-by: Orestis Melkonian <melkon.or@gmail.com>
g.identity.provides
was populated with only theCern groups. As access rights can be assigned to single users(i.e. emails),
the user's e-mail must also be included in the
g.identity.provides
.