Skip to content
Browse files

Merge branch 'master' of git://github.com/saturnflyer/radiant-page-gr…

…oup-permissions-extension
  • Loading branch information...
2 parents 8e8956d + cdd231b commit 1386f426606e03c5b588e0561e127fbe67a7cee2 @avonderluft committed
Showing with 4 additions and 1 deletion.
  1. +1 −1 lib/controller_extensions.rb
  2. +3 −0 lib/model_extensions.rb
View
2 lib/controller_extensions.rb
@@ -6,7 +6,7 @@
:denied_message => "You must have group privileges to perform this action."
def user_is_in_page_group
- return true if current_user.admin? || current_user.developer?
+ return true if current_user.admin? || current_user.designer_or_developer?
page = Page.find(params[:id] || params[:page_id] || params[:parent_id] || params[:page][:parent_id])
View
3 lib/model_extensions.rb
@@ -12,4 +12,7 @@ def group_name
UserModelExtensions = Proc.new do
has_and_belongs_to_many :groups
+ def designer_or_developer?
+ respond_to?(:designer?) ? designer? : developer?
+ end
end

0 comments on commit 1386f42

Please sign in to comment.
Something went wrong with that request. Please try again.