From af9e5cc8b0cf6425576c46d2db912f3107c31ebf Mon Sep 17 00:00:00 2001 From: Sophie Feng Date: Mon, 23 Sep 2024 01:22:04 -0400 Subject: [PATCH 1/2] Edit in middleware/user.js to define accessibility --- dump.rdb | Bin 0 -> 47337 bytes src/middleware/user.js | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 dump.rdb diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000000000000000000000000000000000..a504a165f36c8b53a89cf708daaac2145cbe956a GIT binary patch literal 47337 zcmd6Q349yJdG9PPlHdjKCPfKLkP<19;3-lftSAeTx@^gkCD~3a+rR=?l8`_E!2+V_ z9EPp?J{{Y!ozO>|#A(vBY27q+QpkLHO|RFqP180_Ue`+6x=s3OH|$H3*VONunO$J9 zT7aZ{$k7jygWXxoe)G+D{J&%NY#!gfx390i|Cc3kAs7-}hlIF!ea}G8&@Zj@3x6mf zrnz651BuYI@apU@-kA7haZ(h5u4!TVRp05A=$FNObi(E5MInv;8~s1-pBVeVWIURT zxdWk~d(a(=hYp3p!lWR&$=9Mg78MhsJ1B&Ogy4q9_=UJQ&+X>!bKHjzvY?A`VKO8p z1ekyeekv~77sku)uD#5lB2;po4^D?7?8@RepNPiA%7v}z#?nh$!%;sUW_Lz|LaNzN zwXkijnJIb8-j|(7pUy-Mg@hS5`GxE>KFkRY0j5!`H;vP0$TaFuiTW4mOsW>nrkhKS zPbLL;yP}12X}j@+7z?o-MzMI|{9F~x$JUjd&w$Q+C}F1H-J|i@dG1G^7Do$%Py;#| z;im=jXE8xFkkCF=yzCHH<}*kwlr1 zIX)E%28Bow!yFf9Vb!MD5_E$5GJD=q%rIAgr?_p!w?{*fJ;Fzl0(;$9gP5~(b;Uab z{*X|Pn73>lS)%B1OClNz1w?m(pPc6;PlKaDMUm%pSgeFlgp6V>Mf_wdCC6HWYY@n> z7RVugxV5?D@DOqw$R)>$2qs6*+a<^6*)v&kRA$HloT4R%eO;Cu{dsvL7@dh6iY|Hk zwB_GEU3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af9b..edf7a5699c 100644 --- a/src/middleware/user.js +++ b/src/middleware/user.js @@ -36,6 +36,18 @@ const passportAuthenticateAsync = function (req, res) { }); }; +const showUsername = (userId, currentUser) => { + const isAdmin = currentUser && currentUser.isAdmin; // Check if current user is an admin + + // If the post is anonymous and the current user is not an admin, show 'Anonymous User' + if (isAnonymous && !isAdmin) { + return 'Anonymous User'; + } + + // Otherwise, show the real username + return user.getDisplayName(userId); +}; + module.exports = function (middleware) { async function authenticate(req, res) { async function finishLogin(req, user) { From 5ecb7387fec27ee8e06693dad02ce747990b4fb3 Mon Sep 17 00:00:00 2001 From: Sophie Feng Date: Mon, 23 Sep 2024 02:17:06 -0400 Subject: [PATCH 2/2] fixing some errors when running lint test --- dump.rdb | Bin 47337 -> 47337 bytes src/middleware/user.js | 17 ++++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dump.rdb b/dump.rdb index a504a165f36c8b53a89cf708daaac2145cbe956a..f651b49f0df235ff7d935b982dc815e1caf075bb 100644 GIT binary patch delta 48 zcmV-00MGyF@dD}b0+28fE&lLk`UrJ%Wn?XFWo^Q+*s(#{8v_?;V6z?^!<-0EK0{Qf G4fkt4cNNV5 delta 48 zcmV-00MGyF@dD}b0+28fdHL{W`UrJ%Wn?XFWo^P>im^f38v`S4PO}~y!<-0PscBVy Go-+JD85TtV diff --git a/src/middleware/user.js b/src/middleware/user.js index edf7a5699c..3efdfbee69 100644 --- a/src/middleware/user.js +++ b/src/middleware/user.js @@ -37,15 +37,14 @@ const passportAuthenticateAsync = function (req, res) { }; const showUsername = (userId, currentUser) => { - const isAdmin = currentUser && currentUser.isAdmin; // Check if current user is an admin - - // If the post is anonymous and the current user is not an admin, show 'Anonymous User' - if (isAnonymous && !isAdmin) { - return 'Anonymous User'; - } - - // Otherwise, show the real username - return user.getDisplayName(userId); + const isAdmin = currentUser && currentUser.isAdmin; + + if (isAnonymous && !isAdmin) { + return 'Anonymous User'; + } + + + return user.getDisplayName(userId); }; module.exports = function (middleware) {