<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv" -->

---
title: Authorization belongs on the server, not just in the UI
description: Hiding UI elements does not enforce security; if an API endpoint accepts an action when called directly without a UI, the restriction was only cosmetic. Real...
canonical: https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Authorization belongs on the server, not just in the UI | daily.dev
og:description: Hiding UI elements does not enforce security; if an API endpoint accepts an action when called directly without a UI, the restriction was only cosmetic. Real...
og:url: https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv
og:image: https://api.daily.dev/og/posts/u9AL73BmV.png
og:image:alt: Authorization belongs on the server, not just in the UI
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorization belongs on the server, not just in the UI

**[Auth By Example](https://daily.dev/sources/7eadcwhmohx0bchehapmt)** · [@authbyexample](https://daily.dev/authbyexample) · 1 min read · 0 upvotes · 0 comments

## Summary

Hiding UI elements does not enforce security; if an API endpoint accepts an action when called directly without a UI, the restriction was only cosmetic. Real authorization must be enforced server-side (or at a policy decision point) for every sensitive action, applying the same rules regardless of client type. Suggests checking each sensitive endpoint for proper role, relationship, or attribute checks before shipping.

## Content

Hiding a button does not revoke a permission.

If the API still accepts the action when someone calls it directly, the UI “restriction” was only cosmetic. Real authorization checks the request on the server (or at a policy decision point) every time — same rules for browsers, scripts, and mobile clients.

Useful habit: for every sensitive action, ask what happens if you hit the endpoint with a valid session but no UI. If it succeeds without a role, relationship, or attribute check, fix that before you ship the empty state.

## Similar posts on daily.dev

- [Protecting Next.js Applications in the Era of Server Actions](https://daily.dev/posts/protecting-next-js-applications-in-the-era-of-server-actions-wqyz3uq9e) · JS Dev Space · 2 upvotes · 0 comments
- [Designing Continuous Authorization for Sensitive Cloud Systems](https://daily.dev/posts/designing-continuous-authorization-for-sensitive-cloud-systems-sr4t7ined) · InfoQ · 0 upvotes · 0 comments
- [Introduction to REST API Security – FireTail Blog](https://daily.dev/posts/introduction-to-rest-api-security-firetail-blog-78bnnlerb) · Security Boulevard · 0 upvotes · 0 comments
- [Why Real-Time Authorization Is Best For Agentic AI](https://daily.dev/posts/why-real-time-authorization-is-best-for-agentic-ai-dhcs1k2ke) · Nordic APIs · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#appsec](https://daily.dev/tags/appsec), [#authorization](https://daily.dev/tags/authorization)

[View this post on daily.dev](https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv","headline":"Authorization belongs on the server, not just in the UI","text":"Hiding UI elements does not enforce security; if an API endpoint accepts an action when called directly without a UI, the restriction was only cosmetic. Real authorization must be enforced server-side (or at a policy decision point) for every sensitive action, applying the same rules regardless of client type. Suggests checking each sensitive endpoint for proper role, relationship, or attribute checks before shipping.","url":"https://daily.dev/posts/authorization-belongs-on-the-server-not-just-in-the-ui-u9al73bmv","datePublished":"2026-09-17T16:52:34.932Z","dateModified":"2026-09-17T16:52:52.369Z","author":{"@type":"Person","name":"Auth By Example","url":"https://daily.dev/authbyexample","image":"https://media.daily.dev/image/upload/s--Fgz7IgGQ--/f_auto/v1789653205/avatars/avatar_7EADCwHmOHX0bChEhAPmt?_a=BAMAMicg0","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":60}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/7eadcwhmohx0bchehapmt","name":"Auth By Example"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Auth By Example","item":"https://daily.dev/sources/7eadcwhmohx0bchehapmt"},{"@type":"ListItem","position":3,"name":"Authorization belongs on the server, not just in the UI"}]}
```

