PHPackages                             buten/module-guest-restriction - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. buten/module-guest-restriction

ActiveMagento2-module[Authentication &amp; Authorization](/categories/authentication)

buten/module-guest-restriction
==============================

Magento 2 module that restricts access or visibility for guest users.

1.0.0(8mo ago)04MITPHPPHP &gt;=8.1

Since Oct 30Pushed 8mo agoCompare

[ Source](https://github.com/pbuten/m2-guest-restriction)[ Packagist](https://packagist.org/packages/buten/module-guest-restriction)[ RSS](/packages/buten-module-guest-restriction/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Buten\_GuestRestriction
=======================

[](#buten_guestrestriction)

**Buten\_GuestRestriction** is a lightweight Magento 2 module designed to **restrict access and hide specific frontend content for guest (not logged-in) users**.
It helps store owners ensure that certain features, blocks, or pages are visible only to authenticated customers - improving user flow and protecting restricted content.

---

🧩 Features
----------

[](#-features)

- 🚫 Hide or disable layout blocks for guest users.
- ⚙️ Configurable from the Magento Admin panel.
- 🧩 Compatible with both Magento Open Source and Adobe Commerce.
- 🧩 Lightweight - no database schema changes or UI components added.

---

🏗️ Module Structure
-------------------

[](#️-module-structure)

```
Buten/GuestRestriction
├── etc/
│   ├── adminhtml/system.xml       # Admin configuration settings
│   ├── config.xml                 # Default configuration values
│   ├── frontend/di.xml            # Dependency Injection for frontend
│   ├── frontend/events.xml        # Observers for frontend area
│   └── module.xml                 # Module declaration
├── Helper/ConfigHelper.php        # Fetch configuration values
├── Observer/RemoveBlocksObserver.php # Removes restricted blocks for guests
├── Plugin/RestrictPlugin.php      # Plugin logic for restriction
├── registration.php               # Registers the module with Magento

```

---

⚙️ Installation
---------------

[](#️-installation)

### Option 1: Install via Composer (recommended)

[](#option-1-install-via-composer-recommended)

If the module is published on Packagist or your VCS repository:

```
composer require buten/module-guest-restriction
bin/magento module:enable Buten_GuestRestriction
bin/magento setup:upgrade
bin/magento cache:flush
```

### Option 2: Manual installation

[](#option-2-manual-installation)

1. Copy this module to: ```
    app/code/Buten/GuestRestriction

    ```
2. Enable and upgrade: ```
    bin/magento module:enable Buten_GuestRestriction
    bin/magento setup:upgrade
    bin/magento cache:flush
    ```

---

🔧 Configuration
---------------

[](#-configuration)

Navigate to:

> **Admin Panel → Stores → Settings → Configuration → Buten → Guest Restriction**

\*Select scope if required.

### Available Settings

[](#available-settings)

SettingDescription**Enabled**Turn guest restriction on or off (redirects guests to the login page)**Allowed pages**Specify the list of pages allowed for guests**Remove blocks**(Optional) Turn blocks removal on or off**Blocks to be removed**(Optional) Specify the list of block names to be removed---

🧩 Compatibility
---------------

[](#-compatibility)

Magento VersionSupportedMagento Open Source &gt;= 2.4.4✅Adobe Commerce &gt;= 2.4.4✅PHP &gt;= 8.1✅---

🧩 Technical Details
-------------------

[](#-technical-details)

- **Area:** Frontend only
- **Depends on:** `Magento_Customer`, `Magento_Store`
- **Entry Points:** Observers &amp; Plugins
- **Data Storage:** Uses configuration only (no DB tables)

---

👨‍💻 Developer
-------------

[](#‍-developer)

**Author:** Pavlo Butenko
**GitHub:**
**Email:**

If you find this module useful, please ⭐ star the repository!

---

📄 License
---------

[](#-license)

This module is licensed under the [MIT License](LICENSE.txt).
You’re free to use, modify, and distribute it in commercial or open-source projects as long as you retain the copyright notice.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance61

Regular maintenance activity

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

246d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8380231?v=4)[Uten Boonliam](/maintainers/buten)[@buten](https://github.com/buten)

### Embed Badge

![Health badge](/badges/buten-module-guest-restriction/health.svg)

```
[![Health](https://phpackages.com/badges/buten-module-guest-restriction/health.svg)](https://phpackages.com/packages/buten-module-guest-restriction)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[hryvinskyi/magento2-invisible-captcha

Magento 2 Google Invisible Captcha (Recaptcha) module

289.6k](/packages/hryvinskyi-magento2-invisible-captcha)[imi/magento2-friendly-captcha

Friendly Captcha integration for Magento2

19131.4k](/packages/imi-magento2-friendly-captcha)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
