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

chore: add prebuilds system user#16916

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
SasSwart merged 28 commits intomainfromprebuilds-system-user
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
28 commits
Select commitHold shift + click to select a range
300e80f
add prebuilds system user database changes and associated changes
SasSwartMar 12, 2025
b788237
optionally prevent system users from counting to user count
dannykoppingMar 13, 2025
8122595
appease the linter
dannykoppingMar 13, 2025
bfb7c28
add unit test for system user behaviour
dannykoppingMar 13, 2025
6639167
reverting RBAC changes; not relevant here
dannykoppingMar 13, 2025
769ae1d
removing unnecessary changes
dannykoppingMar 13, 2025
e7e9c27
exclude system user db tests from non-linux OSs
dannykoppingMar 13, 2025
3936047
Rename prebuild system user reference
SasSwartMar 17, 2025
8bdcafb
ensure that users.IsSystem is not nullable
SasSwartMar 17, 2025
324fde2
Fixes
dannykoppingMar 17, 2025
81d9dfa
Merge remote-tracking branch 'origin/main' into prebuilds-system-user
SasSwartMar 18, 2025
896c881
renumber migrations
SasSwartMar 18, 2025
de4fb8a
ensure that system users are filtered and returned consistently
SasSwartMar 19, 2025
2751d5b
make -B lint
SasSwartMar 19, 2025
1042c39
rewrite prebuilds system user tests in our usual style
SasSwartMar 19, 2025
f9e9d11
add support for prebuilds user to dbmem
SasSwartMar 19, 2025
7492965
appease the linter
SasSwartMar 19, 2025
29e2020
add support for the prebuilds system user to dbmem
SasSwartMar 19, 2025
8c51585
linter
SasSwartMar 19, 2025
cdc5c71
fix dbmem tests
SasSwartMar 19, 2025
0d4813a
remove restriction on modifying system users for now
SasSwartMar 19, 2025
95d70a3
remove system user index
SasSwartMar 20, 2025
8f1d71c
Merge remote-tracking branch 'origin/main' into prebuilds-system-user
SasSwartMar 24, 2025
7e009e5
invert tests that check for system user update protection
SasSwartMar 24, 2025
addd7c6
lint
SasSwartMar 24, 2025
7a4ef24
Allow TestUpdateSystemUser to run against dbmem
SasSwartMar 24, 2025
f30ce72
Merge remote-tracking branch 'origin/main' into prebuilds-system-user
SasSwartMar 25, 2025
5f0ae5e
Renumber migrations
SasSwartMar 25, 2025
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
remove system user index
  • Loading branch information
@SasSwart
SasSwart committedMar 20, 2025
commit95d70a30762d7d902ee13803df39dc907c73dc5c
1 change: 1 addition & 0 deletionscoderd/database/dbmem/dbmem.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -155,6 +155,7 @@ func New() database.Store {
}

q.mutex.Lock()
// We can't insert this user using the interface, because it's a system user.
q.data.users = append(q.data.users, database.User{
ID: prebuilds.SystemUserID,
Email: "prebuilds@coder.com",
Expand Down
3 changes: 0 additions & 3 deletionscoderd/database/migrations/000302_system_user.down.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,8 +46,5 @@ WHERE user_id = 'c42fdf75-3097-471c-8c33-fb52454d81c0';
DELETE FROM users
WHERE id = 'c42fdf75-3097-471c-8c33-fb52454d81c0';

-- Drop index
DROP INDEX IF EXISTS user_is_system_idx;

-- Drop column
ALTER TABLE users DROP COLUMN IF EXISTS is_system;
2 changes: 0 additions & 2 deletionscoderd/database/migrations/000302_system_user.up.sql
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
ALTER TABLE users
ADD COLUMN is_system bool DEFAULT false NOT NULL;

CREATE INDEX user_is_system_idx ON users USING btree (is_system);

COMMENT ON COLUMN users.is_system IS 'Determines if a user is a system user, and therefore cannot login or perform normal actions';

INSERT INTO users (id, email, username, name, created_at, updated_at, status, rbac_roles, hashed_password, is_system, login_type)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp