This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/searchlogic/named_scopes/conditions.rb b/lib/searchlogic/named_scopes/conditions.rb | |
index 31d0643..c0c1d8e 100644 | |
--- a/lib/searchlogic/named_scopes/conditions.rb | |
+++ b/lib/searchlogic/named_scopes/conditions.rb | |
@@ -30,7 +30,9 @@ module Searchlogic | |
BOOLEAN_CONDITIONS = { | |
:null => [:nil], | |
:not_null => [:not_nil], | |
- :empty => [] | |
+ :empty => [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-for model in MODEL_TYPES | |
-if can_view?(model) | |
%h2= model.pluralize | |
=render :partial => "#{model.tableize}/list" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-if has_permission?("people") | |
%h2 People | |
=render :partial => 'people/list' | |
-if has_permission?("organizations") | |
%h2 Organizations | |
=render :partial => 'organizations/list' | |
-if has_permission?("projects") | |
%h2 Projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-if has_permission?("people") | |
%h2 People | |
=render :partial => 'people/list' | |
-if has_permission?("organizations") | |
%h2 Organizations | |
=render :partial => 'organizations/list' | |
-if has_permission?("projects") | |
%h2 Projects |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See ActionController::RequestForgeryProtection for details | |
# Uncomment the :secret if you're not using the cookie session store | |
protect_from_forgery # :secret => '76442f0e40a981d5e2b791b320bd8e94' | |
def must_be_admin | |
redirect_to '/' unless self.current_user.in_role?("admin") | |
flash[:notice_error] = "Access Denied..." unless self.current_user.in_role?("admin") | |
end |
NewerOlder