Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add update user password endpoint#1310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 17 commits intomainfrombq/update-user-password
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
346e5e4
Add UpdateUserHashedPassword query
BrunoQuaresmaMay 4, 2022
4bd7557
chore: Merge branch 'main' of github.com:coder/coder into bq/update-u…
BrunoQuaresmaMay 4, 2022
de39cf5
Add database functions
BrunoQuaresmaMay 5, 2022
2fe1716
Add update user password endpoint
BrunoQuaresmaMay 5, 2022
212020a
Add tests and fixes
BrunoQuaresmaMay 5, 2022
2699445
Remove confirmation and fix lint issues
BrunoQuaresmaMay 5, 2022
355f163
Return hash error as server error
BrunoQuaresmaMay 5, 2022
56b29fd
Update coderd/database/databasefake/databasefake.go
BrunoQuaresmaMay 5, 2022
30b8f15
Improve readbility
BrunoQuaresmaMay 5, 2022
f6be255
Add RBAC
BrunoQuaresmaMay 5, 2022
5df5763
Fix route
BrunoQuaresmaMay 5, 2022
b9dbd64
Merge branch 'bq/update-user-password' of github.com:coder/coder into…
BrunoQuaresmaMay 5, 2022
69af903
Add missing TS types
BrunoQuaresmaMay 5, 2022
d85092b
Update update password request params
BrunoQuaresmaMay 5, 2022
96ce751
Remove confirm password from the API
BrunoQuaresmaMay 5, 2022
4f9f506
Update coderd/users.go
BrunoQuaresmaMay 5, 2022
671c56d
Remove user restriction and refactor tests
BrunoQuaresmaMay 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Add RBAC
  • Loading branch information
@BrunoQuaresma
BrunoQuaresma committedMay 5, 2022
commitf6be255e05f3d45af6ade198ca82a99757c67643
5 changes: 4 additions & 1 deletioncoderd/coderd.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,7 +240,10 @@ func New(options *Options) (http.Handler, func()) {
r.Get("/", api.userByName)
r.Put("/profile", api.putUserProfile)
r.Put("/suspend", api.putUserSuspend)
r.Put("/password", api.putUserPassword)
r.Route("/password", func(r chi.Router) {
r.Use(httpmw.WithRBACObject(rbac.ResourceUserPasswordRole))
r.Put("/password", authorize(api.putUserPassword, rbac.ActionUpdate))
})
r.Get("/organizations", api.organizationsByUser)
r.Post("/organizations", api.postOrganizationsByUser)
// These roles apply to the site wide permissions.
Expand Down
4 changes: 4 additions & 0 deletionscoderd/rbac/object.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,6 +24,10 @@ var (
Type: "user_role",
}

ResourceUserPasswordRole = Object{
Type: "user_password",
}

// ResourceWildcard represents all resource types
ResourceWildcard = Object{
Type: WildcardSymbol,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp