Permalink
Browse files

project-memberships-permissions

Then permissions -- only the project owner (and admins) can manipulate these project memberships:
  • Loading branch information...
bryanlarsen authored and iox committed Jun 3, 2013
1 parent 0d3b8ff commit 73ec4338557163a2cba5f9ec573322c063b8b190
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/models/project_membership.rb
@@ -13,15 +13,15 @@ class ProjectMembership < ActiveRecord::Base
# --- Permissions --- #
def create_permitted?
acting_user.administrator?
acting_user.administrator? || project.owner_is?(acting_user)
end
def update_permitted?
acting_user.administrator?
acting_user.administrator? || project.owner_is?(acting_user)
end
def destroy_permitted?
acting_user.administrator?
acting_user.administrator? || project.owner_is?(acting_user)
end
def view_permitted?(field)

0 comments on commit 73ec433

Please sign in to comment.