BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d1e63c7d
Commit
d1e63c7d
authored
Jan 21, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reporter cant create MR. Show user authorized projects in Admin area
parent
96ba1708
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
26 deletions
+14
-26
ability.rb
app/models/ability.rb
+1
-1
user.rb
app/models/user.rb
+3
-3
edit.html.haml
app/views/admin/team_members/edit.html.haml
+5
-16
show.html.haml
app/views/admin/users/show.html.haml
+3
-3
permissions.html.haml
app/views/help/permissions.html.haml
+0
-1
index.html.haml
app/views/merge_requests/index.html.haml
+2
-2
No files found.
app/models/ability.rb
View file @
d1e63c7d
...
@@ -57,13 +57,13 @@ class Ability
...
@@ -57,13 +57,13 @@ class Ability
def
project_report_rules
def
project_report_rules
project_guest_rules
+
[
project_guest_rules
+
[
:download_code
,
:download_code
,
:write_merge_request
,
:write_snippet
:write_snippet
]
]
end
end
def
project_dev_rules
def
project_dev_rules
project_report_rules
+
[
project_report_rules
+
[
:write_merge_request
,
:write_wiki
,
:write_wiki
,
:push_code
:push_code
]
]
...
...
app/models/user.rb
View file @
d1e63c7d
...
@@ -191,9 +191,9 @@ class User < ActiveRecord::Base
...
@@ -191,9 +191,9 @@ class User < ActiveRecord::Base
namespaces:
namespaces
.
map
(
&
:id
),
user_id:
self
.
id
)
namespaces:
namespaces
.
map
(
&
:id
),
user_id:
self
.
id
)
end
end
# Team membership in
personal
projects
# Team membership in
authorized
projects
def
tm_in_
personal
_projects
def
tm_in_
authorized
_projects
UsersProject
.
where
(
project_id:
personal
_projects
.
map
(
&
:id
),
user_id:
self
.
id
)
UsersProject
.
where
(
project_id:
authorized
_projects
.
map
(
&
:id
),
user_id:
self
.
id
)
end
end
# Returns a string for use as a Gitolite user identifier
# Returns a string for use as a Gitolite user identifier
...
...
app/views/admin/team_members/edit.html.haml
View file @
d1e63c7d
%h3
%p
.slead
Edit access
Edit access for
%small
=
link_to
@admin_team_member
.
user_name
,
admin_user_path
(
@admin_team_member
)
=
@admin_team_member
.
project
.
name
in
–
=
link_to
@admin_team_member
.
project
.
name_with_namespace
,
admin_project_path
(
@admin_team_member
)
=
@admin_team_member
.
user_name
%hr
%hr
%table
.zebra-striped
%tr
%td
User:
%td
=
@admin_team_member
.
user_name
%tr
%td
Project:
%td
=
@admin_team_member
.
project
.
name
%tr
%td
Since:
%td
=
@admin_team_member
.
updated_at
.
stamp
(
"Nov 11, 2010"
)
=
render
'form'
=
render
'form'
app/views/admin/users/show.html.haml
View file @
d1e63c7d
...
@@ -106,8 +106,8 @@
...
@@ -106,8 +106,8 @@
%td
=
link_to
group
.
name
,
admin_group_path
(
group
)
%td
=
link_to
group
.
name
,
admin_group_path
(
group
)
-
if
@admin_user
.
personal
_projects
.
present?
-
if
@admin_user
.
authorized
_projects
.
present?
%h5
Personal
Projects:
%h5
Authorized
Projects:
%br
%br
%table
.zebra-striped
%table
.zebra-striped
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
%th
%th
%th
%th
-
@admin_user
.
tm_in_
personal
_projects
.
each
do
|
tm
|
-
@admin_user
.
tm_in_
authorized
_projects
.
each
do
|
tm
|
-
project
=
tm
.
project
-
project
=
tm
.
project
%tr
%tr
%td
=
link_to
project
.
name_with_namespace
,
admin_project_path
(
project
)
%td
=
link_to
project
.
name_with_namespace
,
admin_project_path
(
project
)
...
...
app/views/help/permissions.html.haml
View file @
d1e63c7d
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
%li
Write on project wall
%li
Write on project wall
%li
Pull project code
%li
Pull project code
%li
Download project
%li
Download project
%li
Create new merge request
%li
Create a code snippets
%li
Create a code snippets
...
...
app/views/merge_requests/index.html.haml
View file @
d1e63c7d
-
if
can?
current_user
,
:write_
issue
,
@project
-
if
can?
current_user
,
:write_
merge_request
,
@project
=
link_to
new_project_merge_request_path
(
@project
),
class:
"right btn primary"
,
title:
"New Merge Request"
do
=
link_to
new_project_merge_request_path
(
@project
),
class:
"right btn primary"
,
title:
"New Merge Request"
do
%i
.icon-plus
%i
.icon-plus
New Merge Request
New Merge Request
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
.row
.row
.span3
.span3
=
render
'filter'
,
entity:
'issue'
=
render
'filter'
.span9
.span9
.ui-box
.ui-box
.title
.title
...
...
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