fixes #1789
This commit is contained in:
@@ -163,4 +163,11 @@ class TagAlias < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def deletable_by?(user)
|
||||
return true if user.is_admin?
|
||||
return true if is_pending? && user.is_janitor?
|
||||
return true if is_pending? && user.id == creator_id
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -164,4 +164,11 @@ class TagImplication < ActiveRecord::Base
|
||||
clear_parent_cache
|
||||
clear_descendants_cache
|
||||
end
|
||||
|
||||
def deletable_by?(user)
|
||||
return true if user.is_admin?
|
||||
return true if is_pending? && user.is_janitor?
|
||||
return true if is_pending? && user.id == creator_id
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user