<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hiding-a-button-is-not-authorization-y0op2dgzk" -->

---
title: Hiding a button is not authorization | daily.dev
description: Hiding UI elements like a Delete button is not a security measure since a client can still directly call the underlying API endpoint. Real authorization must...
canonical: https://daily.dev/posts/hiding-a-button-is-not-authorization-y0op2dgzk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hiding a button is not authorization | daily.dev
og:description: Hiding UI elements like a Delete button is not a security measure since a client can still directly call the underlying API endpoint. Real authorization must...
og:url: https://daily.dev/posts/hiding-a-button-is-not-authorization-y0op2dgzk
og:image: https://api.daily.dev/og/posts/Y0op2DgZK.png
og:image:alt: Hiding a button is not authorization
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.

# Hiding a button is not authorization

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

## Summary

Hiding UI elements like a Delete button is not a security measure since a client can still directly call the underlying API endpoint. Real authorization must be enforced server-side, checking on every request whether the specific caller is allowed to perform that specific action on that specific resource.

## Content

Hiding a Delete button in the UI does not stop a client from calling `DELETE /resources/:id`.

Client-side visibility is UX. Authorization belongs on the server: for every request, check that this caller may perform this action on this specific resource.

If the only gate is showing the button for admins, anyone who crafts the request bypasses it.

## Similar posts on daily.dev

- [Access Control Vulnerabilities: Unprotected Admin Functionality with Unpredictable URL](https://daily.dev/posts/access-control-vulnerabilities-unprotected-admin-functionality-with-unpredictable-url-n4d6isdx8) · InfoSec Write-ups · 0 upvotes · 0 comments
- [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

---

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

[View this post on daily.dev](https://daily.dev/posts/hiding-a-button-is-not-authorization-y0op2dgzk)

```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/hiding-a-button-is-not-authorization-y0op2dgzk","headline":"Hiding a button is not authorization","text":"Hiding UI elements like a Delete button is not a security measure since a client can still directly call the underlying API endpoint. Real authorization must be enforced server-side, checking on every request whether the specific caller is allowed to perform that specific action on that specific resource.","url":"https://daily.dev/posts/hiding-a-button-is-not-authorization-y0op2dgzk","datePublished":"2026-09-23T16:06:09.028Z","dateModified":"2026-09-23T16:06:22.286Z","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":"Hiding a button is not authorization"}]}
```

