remove team policy
This commit is contained in:
@ -1,14 +0,0 @@
|
|||||||
class TeamPolicy < ApplicationPolicy
|
|
||||||
[:create?, :index?, :new?].each do |action|
|
|
||||||
define_method(action) { admin? }
|
|
||||||
end
|
|
||||||
|
|
||||||
[:destroy?, :edit?, :show?, :update?].each do |action|
|
|
||||||
define_method(action) { admin? || member? }
|
|
||||||
end
|
|
||||||
|
|
||||||
def member?
|
|
||||||
@record.members.include?(@user)
|
|
||||||
end
|
|
||||||
private :member?
|
|
||||||
end
|
|
Reference in New Issue
Block a user