Replace UserIDRange/GroupIDRange by IDRange in internal type to reduce difference with external type.
We had IDRange in both types prior9440a68744
commit that splitted it into UserIDRange/GroupIDRange. Later, inc91a12d205
commit we had to revert this changes because they broke backward compatibility but UserIDRange/GroupIDRange struct left in the internal type. This commit removes these leftovers and reduces the differences between internal and external types.
This commit is contained in:
@@ -164,12 +164,12 @@ func PSPAllowsFSType(psp *policy.PodSecurityPolicy, fsType policy.FSType) bool {
|
||||
}
|
||||
|
||||
// UserFallsInRange is a utility to determine it the id falls in the valid range.
|
||||
func UserFallsInRange(id int64, rng policy.UserIDRange) bool {
|
||||
func UserFallsInRange(id int64, rng policy.IDRange) bool {
|
||||
return id >= rng.Min && id <= rng.Max
|
||||
}
|
||||
|
||||
// GroupFallsInRange is a utility to determine it the id falls in the valid range.
|
||||
func GroupFallsInRange(id int64, rng policy.GroupIDRange) bool {
|
||||
func GroupFallsInRange(id int64, rng policy.IDRange) bool {
|
||||
return id >= rng.Min && id <= rng.Max
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user