Skip to content
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

Fix #543: Always show logged-in user's full name or username in page … #549

Merged
merged 1 commit into from
Aug 12, 2016

Conversation

seav
Copy link
Contributor

@seav seav commented Aug 12, 2016

Proposed changes in this pull request

  • Fix User name in header bug #543:
    • Bug root cause: the OrganizationMembersEdit view is a subclass of the generic DetailView and it views a single User object, namely the organization member whose permissions are being edited or to be removed from the organization. The default behavior of DetailView is to helpfully add a context variable whose name is the model_name of the object model (documentation). Thus, the user currently being viewed gets placed into the user context, which overrides the logged-in user leading to the bug.
    • Override DetailView's get_context_object_name() method to avoid overwriting the logged-in user.
    • Modify an existing unit test to catch this bug and to confirm it has been fixed.

When should this PR be merged

Anytime.

Risks

None.

Follow up actions

None.

@oliverroick oliverroick merged commit 6a766f5 into master Aug 12, 2016
@oliverroick oliverroick deleted the bugfix/#543 branch August 12, 2016 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User name in header bug
3 participants