Automatically translated.View original post

🔥 Why does Admin see everything... but User can only see some pages? This is "User Roles." 🔐

💡 EP.5 of Web App 201, we will understand the basic User Roles, who should see what in the system.

🎯 Understand the division of user rights.

Make the system look more professional

Reduce the problem of people accessing misinformation.

🧠 User Roles = Determining each person's "rights." 👥

Basic Role frequently encountered:

👑 Admin

Manage users

Edit / delete data

Access to the backyard Dashboard.

👤 User

General Use

See your own specifics.

Flow Working 🧩

Login into the system

Backend, check Role.

Send the right back.

Frontend displays a menu / web page based on Role.

💡 Key.

"Hide the button" alone is not enough.

Backend always has to check.

📊, like an online store system.

Admin → Manage goods / order

User → See goods / order

👉 Different Permission = Different Experience

🛠️ How to

Start doing simple:

Increased field role in Database

Configure, such as admin / user

Check Role at Login

Show page / menu by permissions

Backend Side Key API Protection

🚀 Comment "ROLE" 👇

I'll give away Flow. The User Roles + Structure system is real!

# WebApp 201 # UserRoles # Authentication # AdminPanel # WebDevelopment

5/7 Edited to

... Read moreจากประสบการณ์ส่วนตัวในการพัฒนาเว็บแอป ผมพบว่าการกำหนด User Roles อย่างถูกต้องเป็นหัวใจสำคัญในการรักษาความปลอดภัยและเพิ่มประสิทธิภาพการใช้งานของระบบ โดยเฉพาะอย่างยิ่งในระบบที่มีข้อมูลหลากหลายและความละเอียดซับซ้อน เช่น ระบบร้านค้าออนไลน์ หรือแพลตฟอร์มบริหารจัดการทีมงาน สิ่งที่หลายคนอาจไม่รู้คือ การซ่อนปุ่มหรือเมนูเฉพาะฝั่งหน้าจอ (frontend) อย่างเดียวไม่เพียงพอ เพราะหากฝั่ง backend ไม่ได้ตรวจสอบสิทธิ์อย่างเข้มงวด ก็มีความเสี่ยงที่ผู้ใช้งานทั่วไป (User) จะเข้าถึงหรือทำการแก้ไขข้อมูลสำคัญที่ควรสงวนไว้สำหรับ Admin เท่านั้น โดยในกระบวนการทำงานจริง หลังจากที่ผู้ใช้ล็อกอินเข้าระบบ backend จะทำการตรวจสอบ Role ของผู้ใช้ทันที จากนั้นส่งสิทธิ์การเข้าถึงที่เหมาะสมกลับไปยัง frontend เพื่อแสดงหน้าเว็บและเมนูที่สอดคล้องกับ Role นั้น ๆ เช่น ผู้ดูแลระบบ (Admin) จะเห็นหน้าจอดูแลระบบทั้งหมด สามารถแก้ไขหรือจัดการข้อมูลที่สำคัญ ส่วนผู้ใช้งานปกติ (User) จะถูกจำกัดให้อยู่ในขอบเขตของข้อมูลส่วนตัวหรือฟังก์ชันใช้งานทั่วไป อีกทั้งในขั้นตอนการออกแบบฐานข้อมูล (Database) การเพิ่มฟิลด์สำหรับระบุ Role และตั้งค่าค่าเป็น admin หรือ user นั้น จะช่วยให้การตรวจสอบสิทธิ์เป็นระบบและง่ายขึ้น สำหรับผู้ที่เริ่มต้น ผมแนะนำให้ทดลองสร้างระบบ User Roles แบบง่าย ๆ นี้ก่อน เพื่อให้เข้าใจหลักการทำงานและผลกระทบต่อประสบการณ์ผู้ใช้ จากนั้นค่อยขยายระบบให้รองรับ Roles และ Permissions ที่หลากหลายมากขึ้นตามความต้องการของระบบที่ซับซ้อนขึ้นในอนาคต สุดท้าย หากใครสนใจ รับรองว่าการจัดการ User Roles อย่างเหมาะสม จะช่วยให้ระบบเว็บแอปของคุณน่าเชื่อถือ ปลอดภัย และใช้งานง่ายขึ้นอย่างมากแน่นอนครับ

Related posts

Literally Why Tf Do You Care?
Train yourself to put yourself first! Would that person put up with the disrespect if roles were reversed? Stop caring so much and learn how to walk away when you’re not valued in ANY situation! . . . . #podcast #youtube #lemon8diarychallenge
LoveVeeTalks

LoveVeeTalks

7743 likes

POV: British Actors are taking all the Roles 😭💀
#fyp #Lemon8 #viral #trending #explorepage✨
HahaHub

HahaHub

1054 likes

A person works on a laptop in a library, with the text overlay 'Certifications That Can Change Your Life in 3 Months', highlighting career transformation through certifications.
The image lists '1. Cloud Computing' certifications: AWS Certified Solutions Architect Associate, Microsoft Azure Solutions Architect Expert, and Google Associate Cloud Engineer, with their respective logos.
The image displays '2. Cybersecurity' certifications: CompTIA Security+, Certified Information Systems Security Professional (CISSP), and Certified Ethical Hacker (CEH), along with their logos.
Certifications That Can Change Your Life in 3 Mont
Certifications That Can Change Your Life in 3 Months You don’t need 4 years to change your career. Some certifications can make you job-ready in just 8–12 weeks — and recruiters actively look for them. If your goal is to get hired in 2025–2026, start with these: 1️⃣ AWS Certified Cloud Practiti
devswitchwithai

devswitchwithai

479 likes

A smiling couple, a man and a woman, take a selfie. Overlay text reads: "OUR RELATIONSHIP ISN'T 50/50 AND IT SHOULDN'T BE." The image includes Lemon8 branding with the username @fromsarahjolie.
A couple takes a selfie, with text overlay stating "EQUITY > EQUALITY." The text explains the shift from focusing on 50/50 equality to equity in a relationship, acknowledging different needs and strengths. Lemon8 branding is visible.
A couple sits on a couch eating pizza. Text overlay titled "HOW EQUITY SHOWS UP IN OUR RELATIONSHIP" details examples in finances, household chores, and emotional support. Lemon8 branding with the username @fromsarahjolie is present.
why equality doesn't work in my relationship…
I used to be someone who would always be focused on EQUALITY in my relationship ALL THE TIME. If I didn’t see my partner pulling his weight 50/50 one day, I would be so upset. I tried to make sure EVERYTHING was 50/50. Chores. Expenses. You name it. But I realized just how unhappy and more importan
Sarah Jolie 🌸

Sarah Jolie 🌸

709 likes

✨ Common Family Roles & why they don’t define you.
Growing up in chaos or dysfunction often forces kids into survival roles the hero, the scapegoat, the lost child, the caretaker, the mascot, the parentified child, and/or the golden child. These were coping strategies, not your character. They helped you make sense of an unsafe environment but
Jessica Irene

Jessica Irene

108 likes

Clifton Powell says he won’t compromise on roles
#trending #relatable #explore #celebrity #fyp
The Real Yvette Rants

The Real Yvette Rants

20 likes

want a resume that actually gets replies? 💻
here’s the resume I used to land my current role as a product marketing manager in tech (after getting ghosted by way too many applications 😭) I reworked my resume so many times before this version finally started getting replies. here’s what made the difference 👇 🔹 I tailored it to the job d
Alex | Career & Confidence

Alex | Career & Confidence

710 likes

Money roles that actually work
Most financial advice ° out there obsesses over investment types 9 , accounts, and strategies. But none of that matters if your foundational habits are broken. True financial growth starts with how you think about and handle money every single day. #makemoneyonline #financialfreedom #finan
Sofmoneyclub

Sofmoneyclub

76 likes

The image introduces accounting-related job roles for college students, graduates, or those new to the field. It features the title "Accounting related roles to search for...." and a subtitle explaining its purpose, set against a pink and purple background.
This image lists and describes entry to mid-level financial accounting roles, including Staff Accountant, Junior Accountant, Accounting Assistant/Clerk, Bookkeeper, and Accounts Payable/Receivable Specialist, detailing their primary responsibilities.
The image presents specialized financial accounting roles such as Tax Accountant, Cost Accountant, Forensic Accountant, and Auditor/Internal Auditor, along with a brief description of each role's focus and responsibilities.
Accounting roles job titles to look for
These are some Accounting roles and a brief overview of what they do. If you’re interested in beginning a career in Accounting check out my TikTok @ officedani3 #accounting #jobs #jobtips #work #bookkeeping
OfficeDani

OfficeDani

6 likes

The image shows a person in white athletic wear, a laptop, headphones, and a mug on a yoga mat. Text reads "7 Lazy Girl Remote Jobs ✨" and "( no interview process )", indicating a list of easy remote work opportunities.
This image details an Amazon Customer Service Associate role, paying $27/Hour. It mentions solving customer issues via chat/email, provided training/laptop, and being fully remote.
This image describes a Netflix Binge Watcher position, paying $45/Hour. It involves rating and reviewing shows from home, requires no experience, and includes training.
WFH Roles Perfect For Lazy Girlies 🥰
#remotejobs #wfh
Luna Harper

Luna Harper

530 likes

Project Management roles for creative girlies
Project management offers a fantastic opportunity for you to tap into your creativity ✨🎨 Heres why: ✨ Freedom to think of innovative ways to run your projects. You can oftentimes be creative with your project plan templates, what software tools you use, and how you organize parts of your pro
Melissa 👩🏽‍💻

Melissa 👩🏽‍💻

149 likes

A gaming setup featuring a main monitor displaying a game and a vertical second monitor showing OBS and Discord, highlighted by an arrow. The text overlay explains the purpose of the second screen for streaming and communication.
A close-up of a vertical second monitor displaying OBS at the top and a Discord server for 'Palia' at the bottom. The text overlay emphasizes Discord's role in keeping connected while gaming.
A wide shot of a gaming desk with a main monitor showing a game and a vertical second monitor displaying OBS and Discord. The text overlay highlights how this setup prevents tabbing out, allowing for game immersion.
Why I Keep OBS + Discord on a Second Screen
I use a second monitor just for OBS and Discord, and it feels like having a little control tower floating next to my main screen. ✨ On one side, I can watch over my stream like a guardian, checking alerts, scenes, and stats without disturbing the world unfolding on my main monitor. On the other sid
enchanted._.luna  ≽^• ˕ • ྀི≼

enchanted._.luna ≽^• ˕ • ྀི≼

163 likes

Jaws🦈 With Reversed Roles🛥️🏊🏼
GentleMan100

GentleMan100

1673 likes

2026:The year of getting my life back
2025 showed me how amazing it feels to be truly present in my life. I’ve spent so much time distracting myself from emotions and struggles by scrolling for hours. This is the year that stops. You have all the power to make your life what YOU want it to be. Setting goals: I’ve put together a visi
Lex💗

Lex💗

58 likes

Jared Padalecki and Genevieve Padalecki in a close-up selfie, with Genevieve kissing Jared's cheek. Jared has long hair and a beard, while Genevieve has long brown hair. They appear happy and affectionate.
Jared Padalecki, wearing a blue beanie and black hoodie, and Genevieve Padalecki, leaning on his shoulder, smiling at the camera outdoors with green foliage in the background.
Jared Padalecki and Genevieve Padalecki sharing a kiss. Jared wears a bucket hat, and Genevieve has a patterned scarf. Below is a partial Instagram post from Genevieve celebrating Jared's birthday and their 17 years together.
Jared & Genevieve Padelacki Celebrates, Here’s Why
Alright so no major news. She is stepping back into acting full time and we know most of what Jared been up to along with his upcoming projects! This is simply a Happy 43rd Birthday to Jared Padelacki whose Birthday was Saturday July. 19th. They spent the day celebrating together out in sun
TheAbbottWay

TheAbbottWay

207 likes

A green hedge wall with a pink neon "Enjoy Boba Tea Time" sign. Yellow text asks "WHAT'S ONE JOB THAT SHOULD PAY WAYYY MORE THAN IT DOES?", with a "SWIPE" arrow. A wooden bench is below, with "#ratingjobs" and Lemon8 branding.
A street scene at dusk with a prominent "DOLLAR GENERAL" sign. Text overlays discuss the job, stating it pays "$10.10/hr (first hire)" and involves "doing the job of 5 ppl" and "long hours w no breaks." Lemon8 branding is at the bottom.
An urban street scene with buildings under a clear sky. Text overlays highlight the "TEACHER" profession, noting low pay ($34k/yr) and the diverse roles teachers fulfill, like "parents, siblings, therapists, nurse etc." Lemon8 branding is present.
ONE JOB THAT SHOULD PAY MORE THAN IT DOES??
Let’s be real for a sec, there are jobs out here doing the most for the least 😩 Whether it’s physically demanding, emotionally exhausting, or just wildly underappreciated, some roles deserve way more $$$ than they get. Drop the job that you think is criminally underpaid. Mine is obviously
celeste ☆

celeste ☆

38 likes

Why Musical Theater?
1. You meet incredible people! Musical theater is meant to draw in people. No matter where you participate, you’re going to interact with people you normally wouldn’t. What a cool thing?! 2. You get out of your comfort zone. Theater pushes you in all the right ways. You learn to do things you neve
Kali Grace

Kali Grace

35 likes

A laptop on a white desk with pink flowers and a rose gold organizer, featuring text overlays "5 Free Online STUDY RESOURCES For Students" and "BEDROOM PRODUCTIVITY."
A pink binder with "Stay Positive Work Hard" text, a brown notebook, and a rose gold organizer, with the Quizizz logo overlaid.
A pink binder with "Stay Positive Work Hard" text, a brown notebook, and a rose gold organizer, with the TEDEd logo overlaid.
5 Free Online Study Resources For Students
Hi, lemons! In the digital age, where screens are our windows to knowledge and curiosity fuels our quest for understanding, students seek tools that align with their dynamic lifestyles. Whether you’re preparing for exams, collaborating with classmates, or simply exploring new subjects, these five f
Lifestyle Babe

Lifestyle Babe

30 likes

when the roles are reversed
My type of evening 💕🦋 #gaming #gamingsetup #gamingaesthetic #gaminglifestyle #gamingcontentcreator #gamers #gamergirl #gamergirlsetup #gamersoflemon8 #gamergirls
hammybanks

hammybanks

1801 likes

Tired of fake remote jobs? Read this
Want remote work paying $20/hr+ — without scams or fake listings? I put together a starter pack that gives you access to real remote opportunities: • Part‑time, freelance, and flexible work • Weekly refreshed opportunities • Roles paying $20/hr+ and some up to $500 per task • Direct applicat
remoteincomeaccess

remoteincomeaccess

1 like

The Sisterhood of ShadowsChapter 8Nephthys
The Great Weaver descended into the Duat wrapped in her Mother aspect, full-bellied, radiant with the warmth of eternal pregnancy, arms extended as if ready to embrace the world and all its sorrows. This was deliberate. She thought Nephthys would respond better to maternal energy, to the kind of ge
Myria

Myria

34 likes

A handwritten list on a spiral notebook page spells out "BOUNDARIES" vertically, with each letter starting a phrase about setting personal limits and self-respect. The page is decorated with a green vine, and the text is in various colors, including a mention of "lemon8" and "@keepupwithniesha" at the bottom.
It’s okay to outgrow people and roles. 🌱
We often think boundaries are meant to keep people out, but they’re actually meant to keep us safe and whole. Respect is a two way journey, and it starts with how you treat yourself. 🕯️📔 Save this for the next time you need a little extra strength to enforce what you’ve set. 💪✨ #GrowthMindset
Life with Niesha ✨

Life with Niesha ✨

46 likes

Titles don’t change leaders. Ego does.
Titles don’t change leaders. Ego does. The higher some people rise, the harder they become to reach. More layers. More distance. Less humanity. But the leaders people actually respect? They don’t change. They grow — without losing who they are. Because they understand one thin
Aman Sahota

Aman Sahota

321 likes

A young woman, likely the author, smiles while holding up her "BROOKE ADMIN MARY CARE ACCESS" ID badge, reflecting her early career in health administration.
An exterior view of the Inova hospital building complex under an overcast sky, with the text "It's a great day to save lives" overlaid, representing the healthcare setting.
A computer screen displays a COVID-19 patient status update from April 2020, showing statistics like positive cases, hospitalizations, and deaths, highlighting the pandemic's impact on healthcare.
Beginning my career in health admin was scary
Finishing college, one of my roles was in a hospital call center—right at the start of the COVID-19 pandemic. I was in school, eager to get my foot in the door, and grateful just to have something lined up while so many places were freezing hiring. The job itself? • Answering patien
Brooke, MHA | Health Admin

Brooke, MHA | Health Admin

117 likes

A wedding ceremony scene shows a bride and groom under a floral arch, with the groom appearing emotional. Overlaid text reads: "let's normalize Trad Wives again."
A woman lies on a picnic blanket, covering her face with a pink Bible. Overlaid text states: "women today are more 'independent' than ever yet more stressed, burnt out, and overwhelmed."
A woman with dark curly hair looks upwards with her eyes closed, standing outdoors. Overlaid text says: "you were told doing everything a man does = empowerment but now you're working, leading, providing and still craving peace."
let’s normalize trad wives again
let’s talk about it. women today have more “freedom” than ever before, and yet so many are exhausted, overwhelmed, anxious, and still unfulfilled. you were told that empowerment meant doing everything a man does. building a career, being independent, never needing anyone, always being in cont
joelle 💕

joelle 💕

89 likes

Everything Should Be 50/50… But That’s Why It Fails
Most couples don’t fail because they lack effort. They fail because they lack structure. “50/50” sounds fair—but it creates confusion. When both people try to do everything: • responsibility overlaps • decisions slow down • tension builds quietly • no one feels fully supported The
The Professor

The Professor

6 likes

What You need to know about SQL in Tech Roles
Everyone talks about how essential SQL is for landing tech roles—whether it’s data analysis, engineering, or even marketing analytics. But here’s the part they don’t emphasize enough: Practice is KING. It’s not just about learning SQL syntax or watching tutorials; it’s about doing the work—runni
NeLo

NeLo

43 likes

What loyalty in health admin means to me🏥👩‍💻
I’ve always seen myself in healthcare. I grew up watching Untold Stories of the ER and Grey’s Anatomy, not because I wanted to be a doctor—but because I was fascinated by how hospitals ran. Now, as someone working in healthcare administration, I still feel that pull—but in a deeper way. This fi
Brooke, MHA | Health Admin

Brooke, MHA | Health Admin

75 likes

A woman in a white turtleneck and dark trench coat stands in a museum hallway with paintings, overlaid with text: "Outgrowing Family Roles That Required You to Shrink." The Lemon8 logo and username are visible.
A woman in a white turtleneck and dark trench coat stands in a museum hallway, overlaid with text: "Outgrowing these roles can feel uncomfortable, especially when others were used to the version of you who never said no." The Lemon8 logo and username are visible.
A woman in a white turtleneck and dark trench coat stands in a museum hallway, overlaid with text: "When you change, some people may call it selfish. But what they're really noticing is that the old pattern no longer works." The Lemon8 logo and username are visible.
Outgrowing Family Roles That Require You To Shrink
#fyp #byp #family #relationship #african
Sacred_Soft

Sacred_Soft

2 likes

“U 👀 Happier As A Risk Analyst!”: Why YES I Am 🥰
I get this all the time from previous colleagues Ive worked with. And yes I truly am happier than I was when I first started with this company. I have plenty of time to do things I like in between working. Like practicing my languages on Duolingo or spending money on Amazon. Along with management a
Cat 🐈‍⬛ | ♎️

Cat 🐈‍⬛ | ♎️

41 likes

✨Custom Admin Planner✨
Dr. Grifdin requested this custom planner for her new school. Hourly planning and custom pages for the areas she will supervise. I hope she ❤️s it! #customplanner #planner #HANDMADE #stationery #teacher
LizChristanPrints

LizChristanPrints

21 likes

A job posting for a Program Manager at DailyPay, showing US-Remote location, full-time employment, and compensation range of $100K-$150K. Overlay text highlights '5 FULL-TIME REMOTE JOBS HIRING PART 33'.
A job posting for a Director, Customer Service and Operations in the United States. The company, Pie, aims to make commercial insurance affordable. Overlay text asks 'Tired of applying to jobs everyday...??'.
Details of a job posting, including a base compensation range of $135,000 - $170,000 USD and benefits like equity and health plans. Overlay text states 'we're tired of seeing qualified people get ignored for...'.
FULL TIME REMOTE ROLES HIRING
~ Tired of applying to jobs and getting rejection emails? ~ We help you; • Apply to 25-30 remote roles daily • Customise your CV that helps your applications pass the first screening. • Pass your interview through doing mock interviews ~ If this sounds like you; ~ Visit our website a
Digital Oasis

Digital Oasis

32 likes

Things I’d never thought I’d do as admin 👩🏽‍💻
Working in the field of CPS & Foster Care I started during Covid so the our office was on lock down but as soon as we opened up to the public There are things I never thought I’d do 1. I’d never thought a torn mother would be giving me a bag of her child’s clothes in tears as he was
Jackie Arvizu

Jackie Arvizu

15 likes

Corporate gave you 5 extra roles & no raise👀
So many job seekers are afraid to tweak their job title on a résumé but you KNOW good and well that you were hired for 1 role and ended up doing the work of 50 peoples jobs with no raise, no title change, and a LinkedIn profile that doesn’t even reflect the value you brought. Need help showing w
Chelsea Gerdes | Career Coach

Chelsea Gerdes | Career Coach

8 likes

A woman works on an HP laptop at home. Overlay text introduces 5 real remote jobs that pay well, are flexible, and don't require a degree or a huge learning curve, emphasizing that one doesn't need to be a tech wizard or start a business to earn from home.
This image details the 'Remote Customer Service Representative' job, including its pay of around $18.80/hour, why it's great for patient computer users, and how to apply on job boards like Indeed, FlexJobs, or ZipRecruiter.
This image describes the 'Accounts Payable Specialist (Remote)' role, with pay around $23.70/hour. It highlights its suitability for organized individuals familiar with spreadsheets and how to apply on job boards like ZipRecruiter or Indeed.
✨ Why these are great options: ✔️ You can work from home ✔️ Flexible hours ✔️ Low to no startup cost ✔️ Perfect for people who want stability without commuting or selling anything 👉 Follow me for more beginner-friendly job tips, online income ideas, and remote work options — especially if
Lee Ann Small

Lee Ann Small

16 likes

why is it *so* taboo?! 😵😵‍💫🤫🫠😬😑
This is a topic I’ve been thinking about a lot recently. As women, we often aren’t taught how to deal with money, or accepted in spaces that deal with financial conversations. We are told to tackle the “home” while the man tackles the “harder” things, aka finances, etc. I found an interesting ar
hannah 📖

hannah 📖

452 likes

The cover of Entertainment Weekly's 'The Ultimate Guide to Toy Story' magazine, featuring Woody, Buzz Lightyear, Jessie, Bo Peep, Forky, Rex, Mr. Potato Head, Mrs. Potato Head, Hamm, and an Alien, with headlines about new toys and interviews.
An open magazine spread titled 'The Ultimate Guide to Toy Story' showing Woody, Jessie, and Buzz Lightyear standing in a desert landscape under a blue sky.
An open magazine spread featuring a close-up of Woody's face on the left page and an article titled 'WOODY TOM HANKS' on the right page, discussing his character.
This special edition Toy Story magazine by Entertainment Weekly came out around Toy Story 4 and offers some great character insights and behind the scenes. Love how our toys each have a spread! #toystory #toystoryfan #toystorywoody #woody #buzzlightyear
Amanda

Amanda

20 likes

I Made My Own Digital Magazine Using Canva?! 🤯
I had way more fun making this magazine than I expected. There’s something wildly satisfying about taking a bunch of loose ideas in your head and slowly watching them turn into real pages. Picking the vibe, playing with fonts, rearranging layouts, and seeing it all come together felt like creative
a neurospicy girl + her ipad🎀

a neurospicy girl + her ipad🎀

9 likes

Does not having social media affect your life?
If you don't have a Facebook, Instagram, Snapchat, Twitter, TikTok, etc. while literally everyone else around you does, would you say that would interfere with your social life? I tried to stop using all social media apps a while ago and all it resulted in was me losing connection with most
Zoe💌

Zoe💌

74 likes

gender roles aren't meant to be universal
hence why so many straight (and heavily religious) married people act so miserable. how can you be happy when you and your apparent lifelong partner are playing characters and sticking so closely to somebody else's script? you don't actually know that person, even though you're sleeping
𝚕𝚊𝚝𝚛𝚒𝚌𝚎 ʕっ•ᴥ•ʔっ

𝚕𝚊𝚝𝚛𝚒𝚌𝚎 ʕっ•ᴥ•ʔっ

1 like

See more