Commit Graph

22 Commits

Author SHA1 Message Date
Cian Johnston c83af5e627
chore(cli): add linter to detect potential spurious usage of owner user in cli tests (#10133)
* Detects the following pattern where the CLI is initialized with a client authenticated as the "first user":

    client := coderdtest.New(t, ...)
    [...]
    user := coderdtest.CreateFirstUser(t, client)
    [...]
    clitest.SetupConfig(t, client, root)

* Updates documentation regarding role permissions on workspaces.
2023-10-10 11:14:20 +01:00
Kyle Carberry 22e781eced
chore: add /v2 to import module path (#9072)
* chore: add /v2 to import module path

go mod requires semantic versioning with versions greater than 1.x

This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```

Migrate generated files to import /v2

* Fix gen
2023-08-18 18:55:43 +00:00
Steven Masley 6fb8aff6d0
feat: Add initial AuthzQuerier implementation (#5919)
feat: Add initial AuthzQuerier implementation
- Adds package database/dbauthz that adds a database.Store implementation where each method goes through AuthZ checks
- Implements all database.Store methods on AuthzQuerier
- Updates and fixes unit tests where required
- Updates coderd initialization to use AuthzQuerier if codersdk.ExperimentAuthzQuerier is enabled
2023-02-14 14:27:06 +00:00
Kyle Carberry 71a893764e
chore: remove `CreateAnotherUserWithUser` (#6068)
This was not idiomatic Go!
2023-02-06 23:48:21 +00:00
Dean Sheather 6deef06ad2
feat: secure and cross-domain subdomain-based proxying (#4136)
Co-authored-by: Kyle Carberry <kyle@carberry.com>
2022-09-22 22:30:32 +00:00
Kyle Carberry b0fe9bcdd1
chore: Upgrade to Go 1.19 (#3617)
This is required as part of #3505.
2022-08-21 22:32:53 +00:00
Steven Masley 4be61d9250
fix: Role assign ui fixes (#3521)
Co-authored-by: Kira Pilot <kira@coder.com>
2022-08-16 10:39:42 -05:00
Steven Masley 01dd35f1ba
chore: Rename 'admin' to 'owner' (#3498)
Co-authored-by: Colin Adler <colin1adler@gmail.com>
2022-08-15 14:40:19 -05:00
Steven Masley 40e68cb80b
feat: Add template-admin + user-admin role for managing templates + users (#3490)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
2022-08-12 17:27:48 -05:00
Mathias Fredriksson ccf6f4e7ed
chore: Use contexts with timeout in `coderd` tests (#3381) 2022-08-09 20:17:00 +03:00
Steven Masley c9a4642a12
chore: Update BE http errors to be ui friendly (#1994)
* chore: More UI friendly errors

Mainly capitlization + messages prefix error
2022-06-03 21:48:09 +00:00
Steven Masley cc87a0cf6b
feat: Implied 'member' roles for site and organization (#1917)
* feat: Member roles are implied and never exlpicitly added
* Rename "GetAllUserRoles" to "GetAuthorizationRoles"
* feat: Add migration to remove implied roles
* rename user auth role middleware
2022-06-01 09:07:50 -05:00
Steven Masley ec1fe46138
feat: Move create organizations route (#1831)
* feat: last rbac routes
- move create organization to /organizations.
2022-05-27 11:19:13 -05:00
Steven Masley eea8dc6c16
feat: Add rbac to templateversion+orgmember endpoints (#1713) 2022-05-25 11:00:59 -05:00
Steven Masley 2638c274cb
fix: User's should be able to read what roles available (#1575) 2022-05-18 20:47:43 +00:00
Steven Masley 4ad5ac2d4a
feat: Rbac more coderd endpoints, unit test to confirm (#1437)
* feat: Enforce authorize call on all endpoints
- Make 'request()' exported for running custom requests
* Rbac users endpoints
* 401 -> 403
2022-05-17 13:43:19 -05:00
Steven Masley b55d83ca82
feat: Add suspend/active user to cli (#1422)
* feat: Add suspend/active user to cli
* UserID is now a string and allows for username too
2022-05-16 15:29:27 -05:00
Bruno Quaresma e6168ba238
feat: Add permissions for links (#1407) 2022-05-13 14:25:57 +00:00
Steven Masley 64e408c954
feat: Check permissions endpoint (#1389)
* feat: Check permissions endpoint

Allows FE to query backend for permission capabilities.
Batch requests supported
2022-05-12 20:56:23 +00:00
Bruno Quaresma e54324d880
refactor: Add roles into the user response (#1347) 2022-05-09 16:38:14 +00:00
Bruno Quaresma 00806580f5
refactor: Return the display_name and name in the roles endpoint (#1328) 2022-05-06 19:18:00 +00:00
Steven Masley d0293e4d33
feat: Implement list roles & enforce authorize examples (#1273) 2022-05-03 16:10:19 -05:00