summaryrefslogtreecommitdiff
path: root/config/initializers/permissions_system.rb
blob: 9d1de9f8a89a6669e6aa26d10e9b517834bf53ff (plain)
1
2
3
4
5
6
7
8
9
10
11
module ActiveRecord
	class Base
		def check_permission(user, verb)
			user.can?("#{verb.to_s}_#{self.class.name.underscore}".to_sym) or self.owned_by?(user)
		end

		def owned_by?(user)
			return false
		end
	end
end