remove unused code for now
This commit is contained in:
parent
78f67017e8
commit
5e3cb2d3e6
|
@ -1,9 +1,5 @@
|
||||||
module Travis::API::V3
|
module Travis::API::V3
|
||||||
class AccessControl::Generic
|
class AccessControl::Generic
|
||||||
DEFAULT_LIMIT = 25
|
|
||||||
MAX_LIMT = 100
|
|
||||||
NO_LIMIT = 2 ** 62 - 1 # larges Fixnum on MRI
|
|
||||||
|
|
||||||
def self.for_request(type, payload, env)
|
def self.for_request(type, payload, env)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -22,23 +18,6 @@ module Travis::API::V3
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
# def limit(resource_type, value = nil)
|
|
||||||
# case value
|
|
||||||
# when ''.freeze, 'true'.freeze, true, nil then DEFAULT_LIMIT
|
|
||||||
# when 'false'.freeze, false then NO_LIMIT
|
|
||||||
# when /^\d+$/ then limit(resource_type, Integer(value))
|
|
||||||
# when 0..MAX_LIMIT then value
|
|
||||||
# end
|
|
||||||
# # # TODO move to config
|
|
||||||
# # value = Time.now.to_i if value == false or value == 'false'.freeze
|
|
||||||
# # value = 25 if value.nil? or value == ''.freezee or value ==
|
|
||||||
# # value = Integer(value)
|
|
||||||
# # value = 100 if value > 100 and not full_access?
|
|
||||||
# # value = 0 if value < 0
|
|
||||||
# rescue TypeError
|
|
||||||
# raise WrongParams, 'limit must be a positive integer'.freeze, resource_type: resource_type
|
|
||||||
# end
|
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def repository_visible?(repository)
|
def repository_visible?(repository)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user