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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
76232d54
Commit
76232d54
authored
Sep 22, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use AccessRequestable#request_access in MembershipActions
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
94edafdf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/controllers/concerns/membership_actions.rb
app/controllers/concerns/membership_actions.rb
+1
-1
lib/api/access_requests.rb
lib/api/access_requests.rb
+1
-1
No files found.
app/controllers/concerns/membership_actions.rb
View file @
76232d54
...
...
@@ -3,7 +3,7 @@ module MembershipActions
include
MembersHelper
def
request_access
Members
::
RequestAccessService
.
new
(
membershipable
,
current_user
).
execute
membershipable
.
request_access
(
current_user
)
redirect_to
polymorphic_path
(
membershipable
),
notice:
'Your request for access has been queued for review.'
...
...
lib/api/access_requests.rb
View file @
76232d54
...
...
@@ -33,7 +33,7 @@ module API
# POST /projects/:id/access_requests
post
":id/access_requests"
do
source
=
find_source
(
source_type
,
params
[
:id
])
access_requester
=
::
Members
::
RequestAccessService
.
new
(
source
,
current_user
).
execute
access_requester
=
source
.
request_access
(
current_user
)
if
access_requester
.
persisted?
present
access_requester
.
user
,
with:
Entities
::
AccessRequester
,
access_requester:
access_requester
...
...
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