BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
94edafdf
Commit
94edafdf
authored
Sep 22, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inverse condition in Members::RequestAccessService
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
690d19db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
request_access_service.rb
app/services/members/request_access_service.rb
+3
-3
No files found.
app/services/members/request_access_service.rb
View file @
94edafdf
...
...
@@ -8,7 +8,7 @@ module Members
end
def
execute
raise
Gitlab
::
Access
::
AccessDeniedError
if
cannot
_request_access?
(
source
)
raise
Gitlab
::
Access
::
AccessDeniedError
unless
can
_request_access?
(
source
)
source
.
members
.
create
(
access_level:
Gitlab
::
Access
::
DEVELOPER
,
...
...
@@ -18,8 +18,8 @@ module Members
private
def
can
not
_request_access?
(
source
)
!
source
||
!
can?
(
current_user
,
:request_access
,
source
)
def
can_request_access?
(
source
)
source
&&
can?
(
current_user
,
:request_access
,
source
)
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