Skip to content

Stabilize flows #50

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Fix: list only workspaces owned by the logged user
- right now all workspaces are listed to which a user has
  access to. Which means the user can open a project on a
  workspace he does not own.
- resolves #53
  • Loading branch information
fioan89 committed Aug 4, 2022
commit 382f363845fb4a4ec7e8305b7497ced838525a89
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
## [Unreleased]
### Fixed
- `Recent Coder Workspaces` label overlaps with the search bar in the `Connections` view
- working Workspaces are now listed when there are issues with resolving agents
- working Workspaces are now listed when there are issues with resolving agents
- list only workspaces owned by the logged user

### Changed
- links to documentation now point to the latest Coder OSS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CoderRestClientService {
* @throws WorkspaceResponseException if workspaces could not be retrieved.
*/
fun workspaces(): List<Workspace> {
val workspacesResponse = retroRestClient.workspaces().execute()
val workspacesResponse = retroRestClient.workspaces("owner:me").execute()
if (!workspacesResponse.isSuccessful) {
throw WorkspaceResponseException("Could not retrieve Coder Workspaces:${workspacesResponse.code()}, reason: ${workspacesResponse.message()}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.coder.gateway.sdk.v2.models.WorkspaceResource
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
import java.util.UUID

interface CoderV2RestFacade {
Expand All @@ -21,7 +22,7 @@ interface CoderV2RestFacade {
* Retrieves all workspaces the authenticated user has access to.
*/
@GET("api/v2/workspaces")
fun workspaces(): Call<List<Workspace>>
fun workspaces(@Query("q") searchParams: String): Call<List<Workspace>>

@GET("api/v2/buildinfo")
fun buildInfo(): Call<BuildInfo>
Expand Down