Skip to content
Snippets Groups Projects
Commit d1e63c7d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Reporter cant create MR. Show user authorized projects in Admin area

parent 96ba1708
No related branches found
No related tags found
1 merge request!1491Omniauth adjustments for Shibboleth integration.
Loading
@@ -57,13 +57,13 @@ class Ability
Loading
@@ -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
] ]
Loading
Loading
Loading
@@ -191,9 +191,9 @@ class User < ActiveRecord::Base
Loading
@@ -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
Loading
Loading
%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
&ndash; = 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'
Loading
@@ -106,8 +106,8 @@
Loading
@@ -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
Loading
@@ -118,7 +118,7 @@
Loading
@@ -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)
Loading
Loading
Loading
@@ -19,7 +19,6 @@
Loading
@@ -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
   
   
Loading
Loading
- 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
Loading
@@ -10,7 +10,7 @@
Loading
@@ -10,7 +10,7 @@
   
.row .row
.span3 .span3
= render 'filter', entity: 'issue' = render 'filter'
.span9 .span9
.ui-box .ui-box
.title .title
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment