#34: enable webhooks for all

This commit is contained in:
Vokhmin Alexey V 2013-05-29 17:05:00 +04:00
parent 53df444d20
commit 352d2ae027
2 changed files with 2 additions and 5 deletions

View File

@ -1,8 +1,6 @@
# -*- encoding : utf-8 -*-
class Projects::HooksController < Projects::BaseController
before_filter :authenticate_user!
# TODO: remove
before_filter lambda { raise CanCan::AccessDenied unless current_user.admin? }
load_and_authorize_resource :project
load_and_authorize_resource :hook, :through => :project

View File

@ -10,9 +10,8 @@
= link_to t("layout.projects.edit"), edit_project_path(@project)
%li{:class => (act == :sections && contr == :projects) ? 'active' : ''}
= link_to t("layout.projects.sections"), sections_project_path(@project)
- if current_user.admin? # TODO: remove
%li{:class => (contr == :hooks) ? 'active' : ''}
= link_to t("layout.projects.hooks"), project_hooks_path(@project)
%li{:class => (contr == :hooks) ? 'active' : ''}
= link_to t("layout.projects.hooks"), project_hooks_path(@project)
- if can? :manage_collaborators, @project
%li{:class => (act == :index && contr == :collaborators) ? 'active' : ''}
= link_to t("layout.projects.edit_collaborators"), project_collaborators_path(@project)