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

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

HahaHub

559 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

41 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

451 likes

Jaws🦈 With Reversed Roles🛥️🏊🏼
GentleMan100

GentleMan100

1459 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

100 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

204 likes

What Does Self Love Actually Mean?
Self-love isn’t just a buzzword—it’s a practice of choosing yourself every single day. From making yourself a priority to walking away from what no longer serves you, it's about creating space for the things that truly nourish you. If you’ve ever wondered how to truly embrace self-love, this is
Abby

Abby

35 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

POV: You’re doing everything & still feel like you’re barely holding it together
Wife. Mom. Business owner. Sister. Friend. You show up for everybody… but behind closed doors, you’re tired. Not just physically—but mentally and emotionally too.😩 You smile in public. You cry in private. You keep going anyway. That’s what functional depression can look like. And
Nicka Harper-Bohannon ✨💛

Nicka Harper-Bohannon ✨💛

255 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

320 likes

Five different portrayals of Tupac Shakur are shown, each in distinct outfits and poses, including a denim jacket, a leather jacket, a striped shirt, a camouflage jacket, and a shearling coat, against a plain background.
TUPAC IN HIS MANY CHARACTER ROLES 🖤👑
D-CEE

D-CEE

185 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

662 likes

How To Progress From Early Career Roles
o(*°▽°*)o Progressing from early career roles marks a pivotal phase characterized by growth, ambition, and strategic planning. Starting out, one often navigates entry-level positions, absorbing knowledge like a sponge and honing fundamental skills. It's a time of exploration, where one discove
Anonxdata

Anonxdata

31 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

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

27 likes

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

hammybanks

1791 likes

How to apply to Job roles
Some discrepancies I see in candidates when it comes to the job market. #jobs #jobinterview #jobstruggles
Quanahmichelle

Quanahmichelle

4 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

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

509 likes

Linkinpark Members and there roles
#ChesterBennington #Mikeshinoda
Lp Soldier

Lp Soldier

6 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 💕

82 likes

A woman with glitter on her face takes a mirror selfie, smiling. The image has text overlay asking, "What Does SELF LOVE Actually Mean?" and includes the Lemon8 logo and username.
A smiling woman with curly hair is shown. Text overlay reads "Making a Yourself" with a description about prioritizing health and well-being as part of self-love.
A woman with curly hair looks away in a bamboo setting. Text overlay states "Walking Away From What Doesn't Walk Away" with a description about leaving things that don't feel right.
What Does Self Love Actually Mean?
Self-love isn’t just a buzzword—it’s a practice of choosing yourself every single day. From making yourself a priority to walking away from what no longer serves you, it's about creating space for the things that truly nourish you. If you’ve ever wondered how to truly embrace self-love, this is
Abby

Abby

26 likes

A laptop on a white desk with pink flowers and rose gold decor. Text overlay reads "5 FREE Online resources for STUDENTS" in blue and pink fonts.
A pink binder with "Stay Positive" text and a rose gold desk organizer. The IXL logo is displayed with text describing IXL as a personalized learning platform for students.
A pink binder and a rose gold desk organizer. Google Keep and Evernote logos are shown with text describing them as note-taking apps for organizing ideas and tasks.
5 Free Online Resources For Students ✨️
Hi, lemons! Fellow knowledge seekers! 🌟 Are you ready to dive into the digital world where learning is lit and productivity is the new cool? Let’s spill the tea on five online resources that are total game-changers for your educational glow-up. Get ready to level up your brain game with these epic
Lifestyle Babe

Lifestyle Babe

150 likes

Did i get the roles right or should i change it✨🫶✨
@♥sturniolo234♥ @❤️sturniolos❤️ @millie🎀 @Jules.Sturniolo @Mrs. Sturniolo @CHRIS’S.WIFE🧡 @god_is_great_15 @✩zinneah✩ @Kenadie #sturniolo triplets #triplets #fyp #fypシ #fyplemon8 should i change the roles and if so tell and I’ll repost it✨ 🫶🏼✨ #sturniolosforever #caput
SturnioloFan813

SturnioloFan813

28 likes

4 Job Application Tips When Finding New Roles
Applying for jobs can be a crucial step in your career journey. Here are some practical tips to help you stand out and increase your chances of landing the job! #lemon8partner #careeradvice
thewerklife

thewerklife

327 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

Biblical Roles Of A Husband 🫶🫶🫶🫶
The Bible gives a clear and weighty role to a husband—not as a ruler to dominate, but as a servant-leader who reflects Christ in the home .Here are the core biblical roles of a husband: 1. Love his wife sacrificially “Love your wives, just as Christ loved the church and gave Himself up for h
Jackie1976

Jackie1976

59 likes

Exploring Marketing Roles🔎 (Digital Marketing)
Digital marketing is the dynamic engine that drives modern business growth. It encompasses a broad range of online strategies and tactics aimed at promoting products, services, and brands in the digital realm. ✨Why is Digital Marketing Important? In the digital age, where online presence is ever
angies list🧸

angies list🧸

223 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

19 likes

A woman does not need to be tamed, only loved.
Gender Roles in Relationships is always seen as a tough topic. It’s doesn’t have to be.
The Basin

The Basin

2 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 ☆

37 likes

Why does nobody teach us this in school?! 🤯
Seriously, if you are a student with a MacBook, these 3 shortcuts are non-negotiable. Especially #2 , no more opening a million tabs just to look up definitions. Which one did you not know? 👇 . . . #macbook #productivity #studywithme #techhacks #collegelife
maritam.notes

maritam.notes

17 likes

Child Support Roles Reversed
Freedom From Child Support #ChildSupportAwareness #childsupport #topten #justice #KnowYourRights #financialprotection #childsupportisfraud #abolishchildsupport #legalproblems #KnowYourRights #legaladvocate #foryou#courttips #legaltips #lawcoach #endchildsupport #stopchildsupport #fyp
Child Support Discharge

Child Support Discharge

11 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 ≽^• ˕ • ྀི≼

142 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 Resume Writer

Chelsea Gerdes Resume Writer

9 likes

A coffee cup with latte art sits on a wooden counter in a cafe. Overlaying the image is text stating: 'Positions are temporary. Ranks and titles are limited. But the way you treat people will always be remembered.' This reinforces the article's message about human connection.
Titles don’t weaken leaders. Distance does.
Titles don’t weaken leaders. Distance does. What organizations really need are leaders who remain human. Some people get promoted and slowly become unrecognizable. Harder to approach. Quicker to dismiss. Wrapped in layers of hierarchy. But the leaders who earn lasting respect don’t
Aman Sahota

Aman Sahota

12 likes

Why can’t women lead sometimes?
I’ve noticed how quickly people try to label this… like wanting to lead or comfort somehow means you’re stepping outside your lane as a woman. But intimacy isn’t a performance. It’s not about who’s “supposed” to do what. It’s about what feels natural, safe, and mutual in that moment. Wantin
brittany

brittany

9 likes

Roles reversed
some people only worry about themselves.. move accordingly!
Jalen Von

Jalen Von

1 like

One interaction can change everything.
One interaction can change everything. Your next opportunity is closer than you think. In every business I’ve built, I’ve followed one rule: Be good to everyone. Not just clients. Not just decision-makers. Everyone. Because roles change. Titles evolve. And the world is smaller
Aman Sahota

Aman Sahota

102 likes

Roles In Tech That Does Not Require Coding
You don’t need to be a programmer to thrive in the tech industry. Here are some exciting non-coding roles to consider: • Technical Content Writer: Craft informative content for tech audiences. • UI/UX Designer: Design user-friendly interfaces. • Product Manager: Drive product development and s
NeLo

NeLo

32 likes

Woman Over 40 & Why Everything Feels Different
Many women experience a spiritual awakening later in life, especially after 40. It often begins with a quiet but powerful realization that the life you’ve been living no longer feels aligned. You start questioning relationships, expectations, and the roles you’ve been playing for years. Thing
Sweet Corn Princess 🌾

Sweet Corn Princess 🌾

3 likes

One with the roles flipped ⭐️
#katseyeworld #fyppppppppppppppppppppppp @Lara Raj @MERET_MANON #trending
yourfavvv.katseyeeditzzz

yourfavvv.katseyeeditzzz

3 likes

Empowering Women in Leadership Roles!
Are you ready to shatter the glass ceiling in STEM? 🚀 Let's talk about the importance of women in leadership roles in Science, Technology, Engineering, and Mathematics fields! Did you know? • Women hold only 26% of executive, senior-level, and management positions in S&P 500 companies.
Pradeep M

Pradeep M

20 likes

LinkedIn HACK for pivoting roles
Recruiters are using LinkedIn recruiter to look up candidates by skills for roles!! Don’t miss out and use the FREE LinkedIn career explorer 🌐 Use LinkedIn Career Explorer! This free tool can help you discover new career paths based on your current skills. 📊 It will show you what skills you
Nikki 👩🏻‍💻

Nikki 👩🏻‍💻

133 likes

How to find early career roles
🌐 Utilize Student Career Sites: Many companies have dedicated career sites for students and recent graduates. These sites often feature internship opportunities, entry-level positions, and rotational programs specifically designed for new grads. Examples include Microsoft's University Recruitin
Nikki 👩🏻‍💻

Nikki 👩🏻‍💻

8 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

73 likes

Let’s talk gender roles in relationships
In our ever evolving world where gender roles are constantly being redefined can we still confidently say that the Man’s role in the home is solely to be the financial provider? We are talking about it this week.
The Basin

The Basin

5 likes

See more