Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/saturnflyer/radiant-page-gr…
Browse files Browse the repository at this point in the history
…oup-permissions-extension
  • Loading branch information
Andrew vonderLuft committed Jul 8, 2010
2 parents 8e8956d + cdd231b commit 1386f42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/controller_extensions.rb
Expand Up @@ -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])

Expand Down
3 changes: 3 additions & 0 deletions lib/model_extensions.rb
Expand Up @@ -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.