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
d796e4fc
Commit
d796e4fc
authored
Feb 02, 2017
by
George Andrinopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update api docs and minor changes
parent
19dda160
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
doc/api/users.md
doc/api/users.md
+1
-0
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+3
-2
No files found.
doc/api/users.md
View file @
d796e4fc
...
...
@@ -271,6 +271,7 @@ Parameters:
-
`can_create_group`
(optional) - User can create groups - true or false
-
`external`
(optional) - Flags the user as external - true or false(default)
On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a
`404`
error,
even in cases where a
`409`
(Conflict) would be more appropriate,
e.g. when renaming the email address to some existing one.
...
...
spec/requests/api/users_spec.rb
View file @
d796e4fc
...
...
@@ -306,9 +306,10 @@ describe API::Users, api: true do
end
it
"updates user with new password and forces reset on next login"
do
put
api
(
"/users/
#{
user
.
id
}
"
,
admin
),
{
password:
'12345678'
}
put
api
(
"/users/
#{
user
.
id
}
"
,
admin
),
password:
'12345678'
expect
(
response
).
to
have_http_status
(
200
)
expect
(
user
.
reload
.
password_expires_at
).
to
be
<
Time
.
now
expect
(
user
.
reload
.
password_expires_at
).
to
be
<
=
Time
.
now
end
it
"updates user with organization"
do
...
...
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