Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Merge requests
  • !9873

Merged
Created Dec 02, 2015 by Administrator@rootOwner

Prevent impersonation if blocked

  • Overview 3
  • Commits 2
  • Changes 4

Created by: atomaka

Issue #9872 (closed) notes that impersonating a blocked user will log you out of your account. A more desirable result is for the administrator to be notified that a blocked user cannot be impersonated. This pull request addresses that in two ways:

When viewing a users page in the administration panel, the Impersonate button will not be present when the user is blocked:

screen shot 2015-12-02 at 8 11 18 am

If an attempt to post against the impersonate URL for a blocked user occurs, a flash message will display notifying the administrator that a blocked user cannot be impersonated:

screen shot 2015-12-02 at 8 14 58 am

Test cases are included for both of these changes.

I have also included a minor change that explicitly defines the impersonator_return_to location instead of relying on HTTP_REFERER.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/atomaka/atomaka/feature/prevent-blocked-impersonation