Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d387f897
Commit
d387f897
authored
Dec 11, 2019
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use AuthLogger for logging ip address of
ip restricted group
parent
40d7fc1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
ee/lib/gitlab/ip_restriction/enforcer.rb
ee/lib/gitlab/ip_restriction/enforcer.rb
+9
-1
No files found.
ee/lib/gitlab/ip_restriction/enforcer.rb
View file @
d387f897
...
...
@@ -7,6 +7,10 @@ module Gitlab
@group
=
group
end
def
logger
@logger
||=
Gitlab
::
AuthLogger
.
build
end
def
allows_current_ip?
return
true
unless
group
&
.
feature_available?
(
:group_ip_restriction
)
...
...
@@ -26,7 +30,11 @@ module Gitlab
return
true
unless
root_ancestor_ip_restrictions
.
present?
root_ancestor_ip_restrictions
.
any?
{
|
ip_restriction
|
ip_restriction
.
allows_address?
(
address
)
}
allowed
=
root_ancestor_ip_restrictions
.
any?
{
|
ip_restriction
|
ip_restriction
.
allows_address?
(
address
)
}
logger
.
info
(
message:
'Attempting to access IP restricted group'
,
group_full_path:
group
.
full_path
,
ip_address:
address
,
allowed:
allowed
)
allowed
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment