Fix #543: Always show logged-in user's full name or username in page … #549
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes in this pull request
OrganizationMembersEdit
view is a subclass of the genericDetailView
and it views a singleUser
object, namely the organization member whose permissions are being edited or to be removed from the organization. The default behavior ofDetailView
is to helpfully add a context variable whose name is themodel_name
of the object model (documentation). Thus, the user currently being viewed gets placed into theuser
context, which overrides the logged-in user leading to the bug.DetailView
'sget_context_object_name()
method to avoid overwriting the logged-in user.When should this PR be merged
Anytime.
Risks
None.
Follow up actions
None.