Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
228da2dd
Commit
228da2dd
authored
Jun 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin can see and remove user identities
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
74a6732c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
CHANGELOG
CHANGELOG
+1
-0
app/controllers/admin/identities_controller.rb
app/controllers/admin/identities_controller.rb
+21
-0
app/views/admin/identities/_identity.html.haml
app/views/admin/identities/_identity.html.haml
+11
-0
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+14
-0
config/routes.rb
config/routes.rb
+2
-0
No files found.
CHANGELOG
View file @
228da2dd
...
...
@@ -7,6 +7,7 @@ v 7.13.0 (unreleased)
- Rename "Design" profile settings page to "Preferences".
- Allow users to customize their default Dashboard page.
- Update ssl_ciphers in Nginx example to remove DHE settings. This will deny forward secrecy for Android 2.3.7, Java 6 and OpenSSL 0.9.8
- Admin can remove user identities
v 7.12.0 (unreleased)
- Fix post-receive errors on a push when an external issue tracker is configured (Stan Hu)
...
...
app/controllers/admin/identities_controller.rb
0 → 100644
View file @
228da2dd
class
Admin::IdentitiesController
<
Admin
::
ApplicationController
before_action
:user
,
only:
[
:destroy
]
def
destroy
identity
=
user
.
identities
.
find
(
params
[
:id
])
respond_to
do
|
format
|
if
identity
.
destroy
format
.
html
{
redirect_to
[
:admin
,
user
],
notice:
'User identity was successfully removed.'
}
else
format
.
html
{
redirect_to
[
:admin
,
user
],
alert:
'Failed to remove user identity.'
}
end
end
end
protected
def
user
@user
||=
User
.
find_by!
(
username:
params
[
:user_id
])
end
end
app/views/admin/identities/_identity.html.haml
0 → 100644
View file @
228da2dd
%tr
%td
=
identity
.
provider
%td
=
identity
.
extern_uid
%td
=
link_to
[
:admin
,
@user
,
identity
],
method: :delete
,
class:
'btn btn-xs btn-danger'
,
data:
{
confirm:
"Are you sure you want to remove this identity"
}
do
%i
.fa.fa-trash
Delete
app/views/admin/users/show.html.haml
View file @
228da2dd
...
...
@@ -23,6 +23,8 @@
%a
{
"data-toggle"
=>
"tab"
,
href:
"#projects"
}
Projects
%li
%a
{
"data-toggle"
=>
"tab"
,
href:
"#ssh-keys"
}
SSH keys
%li
%a
{
"data-toggle"
=>
"tab"
,
href:
"#identities"
}
Identities
.tab-content
#account
.tab-pane.active
...
...
@@ -230,3 +232,15 @@
%i
.fa.fa-times
#ssh-keys
.tab-pane
=
render
'profiles/keys/key_table'
,
admin:
true
#identities
.tab-pane
-
if
@user
.
identities
.
present?
%table
.table
%thead
%tr
%th
Provider
%th
Id
%th
=
render
@user
.
identities
-
else
%h4
This user has no identities
config/routes.rb
View file @
228da2dd
...
...
@@ -149,6 +149,8 @@ Gitlab::Application.routes.draw do
namespace
:admin
do
resources
:users
,
constraints:
{
id:
/[a-zA-Z.\/0-9_\-]+/
}
do
resources
:keys
,
only:
[
:show
,
:destroy
]
resources
:identities
,
only:
[
:destroy
]
member
do
put
:team_update
put
:block
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment