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
Boxiang Sun
gitlab-ce
Commits
91995909
Commit
91995909
authored
Jan 02, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #2375. Admin and owner can manage groups
parent
0bda2d5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
app/models/ability.rb
app/models/ability.rb
+6
-3
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+3
-0
No files found.
app/models/ability.rb
View file @
91995909
...
@@ -107,9 +107,12 @@ class Ability
...
@@ -107,9 +107,12 @@ class Ability
def
group_abilities
user
,
group
def
group_abilities
user
,
group
rules
=
[]
rules
=
[]
# Only group owner and administrators can manage group
if
group
.
owner
==
user
||
user
.
admin?
rules
<<
[
rules
<<
[
:manage_group
:manage_group
]
if
group
.
owner
==
user
]
end
rules
.
flatten
rules
.
flatten
end
end
...
...
app/views/admin/projects/index.html.haml
View file @
91995909
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
%i
.icon-sort-down
%i
.icon-sort-down
%th
Path
%th
Path
%th
Team Members
%th
Team Members
%th
Owner
%th
Last Commit
%th
Last Commit
%th
Edit
%th
Edit
%th
.cred
Danger Zone!
%th
.cred
Danger Zone!
...
@@ -26,6 +27,8 @@
...
@@ -26,6 +27,8 @@
%td
%td
%span
.monospace
=
project
.
path_with_namespace
+
".git"
%span
.monospace
=
project
.
path_with_namespace
+
".git"
%td
=
project
.
users_projects
.
count
%td
=
project
.
users_projects
.
count
%td
=
link_to
project
.
chief
.
name
,
[
:admin
,
project
.
chief
]
%td
=
last_commit
(
project
)
%td
=
last_commit
(
project
)
%td
=
link_to
'Edit'
,
edit_admin_project_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn small"
%td
=
link_to
'Edit'
,
edit_admin_project_path
(
project
),
id:
"edit_
#{
dom_id
(
project
)
}
"
,
class:
"btn small"
%td
.bgred
=
link_to
'Destroy'
,
[
:admin
,
project
],
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
%td
.bgred
=
link_to
'Destroy'
,
[
:admin
,
project
],
confirm:
"REMOVE
#{
project
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
...
...
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