From 73b57164ab8bd6b46e88c2e0a0f7d38bc60df94b Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 17 May 2024 19:53:47 +0800 Subject: [PATCH] :sparkles: Bug fixes of permission check --- .../74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml | 361 +++++++++--------- .../schema/public.abK9xQ.meta | 2 +- .idea/workspace.xml | 32 +- pkg/services/auth.go | 17 +- pkg/services/perms.go | 5 +- 5 files changed, 215 insertions(+), 202 deletions(-) diff --git a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml index 0fad7f5..548fa8f 100644 --- a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml +++ b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25.xml @@ -11,9 +11,9 @@ 4||10|c|G 4||10|C|G 4||10|T|G - 6992 + 7186 16.2 - 1714636069 + 1715783487 true ACDT true ACSST false ACST @@ -808,7 +808,7 @@ false Zulu 13474||10|C|G 13474||-9223372036854775808|U|G 13474||10|U|G - 6992 + 7186 37312 postgres @@ -838,50 +838,50 @@ false Zulu 1 1 - + + 4544 + + + 6304 + + 6171 - - 6181 + + 4571 - - 6182 - - + 3373 3374 3375 3377 - + + 6181 + + 3374 - + 3375 - - 3377 - - + 4569 - - 4570 - - - 4571 - - + 4200 - - 4544 + + 3377 - + 4550 - - 6304 + + 6182 + + + 4570 1 @@ -4249,8 +4249,8 @@ false Zulu standard public schema 1 - 6992 - 2024-05-05.03:46:49 + 7186 + 2024-05-17.11:41:59 2200 523 pg_database_owner @@ -4393,7 +4393,7 @@ false Zulu 37314 - 6227 + 71772littlesheep
@@ -4423,7 +4423,7 @@ false Zulu 37510 - 6251 + 70112littlesheep
@@ -4881,7 +4881,13 @@ false Zulu 6224 20 - + + jsonb|0s + 12 + 7177 + 3802 + + id 1 37320 @@ -4890,7 +4896,7 @@ false Zulu 1 403 - + name 37322 6225 @@ -4900,20 +4906,20 @@ false Zulu 100 pg_catalog - + deleted_at 37323 6226 403 - + 1 37321 1 6224 37320 - + bigint|0s nextval('passport_action_events_id_seq'::regclass) 1 @@ -4922,68 +4928,68 @@ false Zulu 37474 20 - + timestamp with time zone|0s 2 6247 1184 - + timestamp with time zone|0s 3 6247 1184 - + timestamp with time zone|0s 4 6247 1184 - + text|0s 5 6247 25 - + text|0s 6 6247 25 - + text|0s 7 6247 25 - + text|0s 8 6247 25 - + text|0s 9 6247 25 - + bigint|0s 10 6247 20 - + account_id 37483 6247 1 37314 - + id 1 37481 @@ -4992,20 +4998,20 @@ false Zulu 1 403 - + deleted_at 37488 6248 403 - + 1 37482 1 6247 37481 - + bigint|0s nextval('passport_auth_factors_id_seq'::regclass) 1 @@ -5014,56 +5020,56 @@ false Zulu 37324 20 - + timestamp with time zone|0s 2 6227 1184 - + timestamp with time zone|0s 3 6227 1184 - + timestamp with time zone|0s 4 6227 1184 - + smallint|0s 5 6227 21 - + text|0s 6 6227 25 - + jsonb|0s 7 6227 3802 - + bigint|0s 8 6227 20 - + account_id 37333 6227 1 37314 - + id 1 37331 @@ -5072,20 +5078,20 @@ false Zulu 1 403 - + deleted_at 37338 6228 403 - + 1 37332 1 6227 37331 - + bigint|0s nextval('passport_auth_tickets_id_seq'::regclass) 1 @@ -5094,136 +5100,136 @@ false Zulu 37526 20 - + timestamp with time zone|0s 2 6259 1184 - + timestamp with time zone|0s 3 6259 1184 - + timestamp with time zone|0s 4 6259 1184 - + text|0s 5 6259 25 - + text|0s 6 6259 25 - + text|0s 7 6259 25 - + boolean|0s 8 6259 16 - + boolean|0s 9 6259 16 - + jsonb|0s 10 6259 3802 - + jsonb|0s 11 6259 3802 - + text|0s 12 6259 25 - + text|0s 13 6259 25 - + text|0s 14 6259 25 - + timestamp with time zone|0s 15 6259 1184 - + timestamp with time zone|0s 16 6259 1184 - + timestamp with time zone|0s 17 6259 1184 - + bigint|0s 18 6259 20 - + bigint|0s 19 6259 20 - + client_id 37540 6259 1 37404 - + account_id 37535 6259 1 37314 - + account_id 37546 6301 1 37314 - + id 1 37533 @@ -5232,20 +5238,20 @@ false Zulu 1 403 - + deleted_at 37545 6260 403 - + 1 37534 1 6259 37533 - + bigint|0s nextval('passport_magic_tokens_id_seq'::regclass) 1 @@ -5254,56 +5260,56 @@ false Zulu 37459 20 - + timestamp with time zone|0s 2 6245 1184 - + timestamp with time zone|0s 3 6245 1184 - + timestamp with time zone|0s 4 6245 1184 - + text|0s 5 6245 25 - + smallint|0s 6 6245 21 - + bigint|0s 7 6245 20 - + timestamp with time zone|0s 8 6245 1184 - + assign_to 37468 6245 1 37314 - + id 1 37466 @@ -5312,20 +5318,20 @@ false Zulu 1 403 - + deleted_at 37473 6246 403 - + 1 37467 1 6245 37466 - + bigint|0s nextval('passport_notification_subscribers_id_seq'::regclass) 1 @@ -5334,56 +5340,62 @@ false Zulu 37509 20 - + timestamp with time zone|0s 2 6251 1184 - + timestamp with time zone|0s 3 6251 1184 - + timestamp with time zone|0s 4 6251 1184 - + text|0s 5 6251 25 - + text|0s 6 6251 25 - + text|0s 7 6251 25 - + bigint|0s 8 6251 20 - + + text|0s + 9 + 7011 + 25 + + account_id 37518 6251 1 37314 - + id 1 37516 @@ -5392,7 +5404,7 @@ false Zulu 1 403 - + device_id 37523 6252 @@ -5402,20 +5414,20 @@ false Zulu 100 pg_catalog - + deleted_at 37524 6253 403 - + 1 37517 1 6251 37516 - + bigint|0s nextval('passport_notifications_id_seq'::regclass) 1 @@ -5424,81 +5436,81 @@ false Zulu 37489 20 - + timestamp with time zone|0s 2 6249 1184 - + timestamp with time zone|0s 3 6249 1184 - + timestamp with time zone|0s 4 6249 1184 - + text|0s 5 6249 25 - + text|0s 6 6249 25 - + jsonb|0s 7 6249 3802 - + boolean|0s 8 6249 16 - + timestamp with time zone|0s 9 6249 1184 - + bigint|0s 10 6249 20 - + bigint|0s 11 6249 20 - + sender_id 37498 6249 1 37404 - + recipient_id 37503 6249 1 37314 - + id 1 37496 @@ -5507,20 +5519,20 @@ false Zulu 1 403 - + deleted_at 37508 6250 403 - + 1 37497 1 6249 37496 - + bigint|0s nextval('passport_realm_members_id_seq'::regclass) 1 @@ -5529,57 +5541,64 @@ false Zulu 37562 20 - + timestamp with time zone|0s 2 6430 1184 - + timestamp with time zone|0s 3 6430 1184 - + timestamp with time zone|0s 4 6430 1184 - + bigint|0s 5 6430 20 - + bigint|0s 6 6430 20 - + bigint|0s 7 6430 20 - + realm_id 37574 6430 1 37552 - + + account_id + 38570 + 7010 + 1 + 37314 + + account_id 37569 6430 1 37314 - + id 1 37567 @@ -5588,20 +5607,20 @@ false Zulu 1 403 - + deleted_at 37579 6431 403 - + 1 37568 1 6430 37567 - + bigint|0s nextval('passport_realms_id_seq'::regclass) 1 @@ -5610,61 +5629,61 @@ false Zulu 37551 20 - + timestamp with time zone|0s 2 6427 1184 - + timestamp with time zone|0s 3 6427 1184 - + timestamp with time zone|0s 4 6427 1184 - + text|0s 5 6427 25 - + text|0s 6 6427 25 - + text|0s 7 6427 25 - + boolean|0s 8 6427 16 - + boolean|0s 9 6427 16 - + bigint|0s 10 6427 20 - + id 1 37558 @@ -5673,7 +5692,7 @@ false Zulu 1 403 - + alias 37561 6429 @@ -5683,20 +5702,20 @@ false Zulu 100 pg_catalog - + deleted_at 37560 6428 403 - + 1 37559 1 6427 37558 - + bigint|0s nextval('passport_third_clients_id_seq'::regclass) 1 @@ -5705,80 +5724,80 @@ false Zulu 37403 20 - + timestamp with time zone|0s 2 6238 1184 - + timestamp with time zone|0s 3 6238 1184 - + timestamp with time zone|0s 4 6238 1184 - + text|0s 5 6238 25 - + text|0s 6 6238 25 - + text|0s 7 6238 25 - + text|0s 8 6238 25 - + jsonb|0s 9 6238 3802 - + jsonb|0s 10 6238 3802 - + boolean|0s 11 6238 16 - + bigint|0s 12 6238 20 - + account_id 37412 6238 1 37314 - + id 1 37410 @@ -5787,7 +5806,7 @@ false Zulu 1 403 - + alias 37417 6239 @@ -5797,13 +5816,13 @@ false Zulu 100 pg_catalog - + deleted_at 37418 6240 403 - + 1 37411 1 diff --git a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25/storage_v2/_src_/database/hy_passport.gNOKQQ/schema/public.abK9xQ.meta b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25/storage_v2/_src_/database/hy_passport.gNOKQQ/schema/public.abK9xQ.meta index 8a7058b..0bfb1f5 100644 --- a/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25/storage_v2/_src_/database/hy_passport.gNOKQQ/schema/public.abK9xQ.meta +++ b/.idea/dataSources/74bcf3ef-a2b9-435b-b9e5-f32902a33b25/storage_v2/_src_/database/hy_passport.gNOKQQ/schema/public.abK9xQ.meta @@ -1,2 +1,2 @@ #n:public -! [6992, 0, null, null, -2147483648, -2147483648] +! [7186, 0, null, null, -2147483648, -2147483648] diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a517cd5..160800f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,19 +4,12 @@