-
Notifications
You must be signed in to change notification settings - Fork 1
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
Jlc/change staff admin msg pipeline #113
Conversation
06ff176
to
59f8391
Compare
pipe_output = safer_associate_username_by_uid(backend, self.details, self.response, user=self.user) | ||
pipe_output = safer_associate_username_by_uid( | ||
self.request, self.backend, self.details, self.response, user=self.user, | ||
) | ||
|
||
self.assertEqual(None, pipe_output) |
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.
self.assertEqual(None, pipe_output) | |
self.assertIsNone(pipe_output) |
@@ -60,17 +63,21 @@ def test_staff_user_raise_exc(self, user_kwargs): | |||
"""Test the pipeline method try to match with uid, the user with matched username exists | |||
but is staff or superuser. | |||
Expected behavior: | |||
- Raise EoxNelpAuthException exception | |||
- The pipe return an HttpResponseForbidden object. |
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 pipe return an HttpResponseForbidden object. | |
- The pipeline returns an HttpResponseForbidden object. |
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.
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.
makes sense, however it's the first time that I see that someone uses pipe
to refer to a single process, that make s me think about the Unix pipe symbol |
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.
I thing that could be used in that way. The unix pipe operator is used to connect, but here the pipes also changes the process in the interconnection xD.
A pipe is a method used to pass information from one program process to another. Unlike other types of interprocess communication, a pipe only offers one-way communication by passing a parameter or output from one process to another.
https://www.techopedia.com/definition/3410/pipe
https://www.geeksforgeeks.org/pipe-system-call/
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.
were you able to find any reference where someone call this pipe ? I think this make sense but that looks like a literal translation that nobody use
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.
anyway I don't want to get into semantic discussions IMO pipe is not a common term and I prefer something like pipeline method or function but it's up to you
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.
Maybe is not common in social core, but in other context they use the term.
https://github.com/tensorflow/tensorflow/blob/059b23d0dfd34e0d6cdf1f4a65dbc8ed1dfdf54a/tensorflow/lite/tools/model_loader.h#L135
https://github.com/tensorflow/tensorflow/blob/059b23d0dfd34e0d6cdf1f4a65dbc8ed1dfdf54a/configure.py#L1202
{ | ||
"page_header": _("It is not allowed to auto associate staff or admin users"), | ||
"page_content": _( | ||
"You can change permission for that user or try to check the signupsource of the user." |
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.
I'm sure about the relation of the signupsource model here,anyway I prefer something like "You are trying to access with a user that already exists. Please try to authenticate on the site where you registered for the first time or contact support."
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.
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.
d2ed708
to
865fb92
Compare
This change the exception raised to a 403 msg. refactor: update test to the response 403 This update the test to match the saml association with a message in 403 forbidden view. chore: pr assert recommendations chore: pr change msg support chore: pr feedback semantic
865fb92
to
b4c89f0
Compare
Description
refactor: change pipelien auth exception to 403
Testing instructions
Use a Saml flow using a staff and admin user.
Check the authentication msg.
Before
After
English
Arabic
Additional information
Jira story
https://edunext.atlassian.net/browse/FUTUREX-641?atlOrigin=eyJpIjoiNmI0MTAyNzBjMjM4NDZiNjgyMTk4MDM5MjM3ZjViODUiLCJwIjoiaiJ9
Checklist for Merge