From 0697d5a5eaec70a51ded87a3c349fb64ef3b9668 Mon Sep 17 00:00:00 2001 From: Miles Gould Date: Tue, 9 Apr 2013 17:19:38 +0100 Subject: [PATCH] Restrict ability to create authentications. --- app/models/ability.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/ability.rb b/app/models/ability.rb index c5e8c4905..c91bef027 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -43,6 +43,11 @@ class Ability can :manage, ScientificName end + # can create/update/destroy their own authentications against other sites. + can :create, Authentication + can :update, Authentication, :member_id => member.id + can :destroy, Authentication, :member_id => member.id + # anyone can create a post, or comment on a post, # but only the author can edit/destroy it. can :create, Post