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
Léo-Paul Géneau
gitlab-ce
Commits
8e737ed5
Commit
8e737ed5
authored
Jun 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont show remove/modify controls for personal project owner
parent
93e003aa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
app/models/project.rb
app/models/project.rb
+4
-0
app/views/team_members/_team_member.html.haml
app/views/team_members/_team_member.html.haml
+8
-8
app/views/users_groups/_users_group.html.haml
app/views/users_groups/_users_group.html.haml
+2
-0
No files found.
app/models/project.rb
View file @
8e737ed5
...
...
@@ -414,6 +414,10 @@ class Project < ActiveRecord::Base
imported
end
def
personal?
!
group
end
def
rename_repo
old_path_with_namespace
=
File
.
join
(
namespace_dir
,
path_was
)
new_path_with_namespace
=
File
.
join
(
namespace_dir
,
path
)
...
...
app/views/team_members/_team_member.html.haml
View file @
8e737ed5
-
user
=
member
.
user
-
allow_admin
=
current_user_can_admin_project
%li
{
id:
dom_id
(
user
),
class:
"team_member_row access-#{member.human_access.downcase}"
}
.pull-right
-
if
allow_admin
-
if
current_user_can_admin_project
-
unless
@project
.
personal?
&&
user
==
current_user
.pull-left
=
form_for
(
member
,
as: :team_member
,
url:
project_team_member_path
(
@project
,
member
.
user
))
do
|
f
|
=
f
.
select
:project_access
,
options_for_select
(
UsersProject
.
access_roles
,
member
.
project_access
),
{},
class:
"medium project-access-select span2 trigger-submit"
...
...
app/views/users_groups/_users_group.html.haml
View file @
8e737ed5
...
...
@@ -4,6 +4,8 @@
=
image_tag
gravatar_icon
(
user
.
email
,
16
),
class:
"avatar s16"
%strong
=
user
.
name
%span
.cgray
=
user
.
username
-
if
user
==
current_user
%span
.label.label-success
It's you
%span
.pull-right
-
if
@group
.
owners
.
include?
(
user
)
...
...
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