PHPackages                             raffaelj/cockpit-rljutils - 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. raffaelj/cockpit-rljutils

ActiveCockpit-module

raffaelj/cockpit-rljutils
=========================

Addon for Cockpit CMS v1, that adds some hardening, cosmetics and helpers

0.1.7(3y ago)63931MITPHP

Since Aug 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/raffaelj/cockpit_rljUtils)[ Packagist](https://packagist.org/packages/raffaelj/cockpit-rljutils)[ Docs](https://github.com/raffaelj/cockpit_rljUtils)[ RSS](/packages/raffaelj-cockpit-rljutils/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (6)Used By (1)

rljUtils
========

[](#rljutils)

**This addon is not compatible with Cockpit CMS v2.**

See also [Cockpit CMS v1 docs](https://v1.getcockpit.com/documentation), [Cockpit CMS v1 repo](https://github.com/agentejo/cockpit) and [Cockpit CMS v2 docs](https://getcockpit.com/documentation/), [Cockpit CMS v2 repo](https://github.com/Cockpit-HQ/Cockpit).

---

Addon for Cockpit CMS, that adds some hardening, cosmetics and helpers

When using Cockpit with multiple users, it needs some customization. By default, some helper functions bypass the user group access control lists or they talk too much, so they definitely need some adjustments. This addon also adds some UI tweaks and helpers.

This addon helps if you forget to adjust some values and sets them to defaults. It also contains some snippets, I collected in the [cockpit-scripts repository](https://github.com/raffaelj/cockpit-scripts) over the last year.

Some adjustments are opinion-based. I like them and I wrote this addon as a base to work with for my needs. Use the code as inspiration or if you have suggestions, feel free to file an issue or to send a pull request.

More options and helpers may come soon...

**Warning:** If you leave `collections_find`, `collections_tree` and `collections_collections` enabled, you might get some problems with collection-link fields.

Installation
------------

[](#installation)

Copy this repository into `/addons` and name it `rljUtils` or use the cli.

### via git

[](#via-git)

```
cd path/to/cockpit
git clone https://github.com/raffaelj/cockpit_rljUtils.git addons/rljUtils
```

### via cp cli

[](#via-cp-cli)

```
cd path/to/cockpit
./cp install/addon --name rljUtils --url https://github.com/raffaelj/cockpit_rljUtils/archive/master.zip
```

### via composer

[](#via-composer)

Make sure, that the path to cockpit addons is defined in your projects' `composer.json` file.

```
{
    "name": "my/cockpit-project",
    "extra": {
        "installer-paths": {
            "addons/{$name}": ["type:cockpit-module"]
        }
    }
}
```

```
cd path/to/cockpit-root
composer create-project --ignore-platform-reqs aheinze/cockpit .
composer config extra.installer-paths.addons/{\$name} "type:cockpit-module"

composer require --ignore-platform-reqs raffaelj/cockpit-rljutils
```

Usage
-----

[](#usage)

By default, all options, except `locked_entries_disabled`, are enabled.

Disable them via `config/config.yaml` or via UI under "settings" --&gt; "rljUtils"

Scroll down for an example configuration.

Features
--------

[](#features)

### Hardening

[](#hardening)

- set `allowed_uploads` to `'jpg, jpeg, png, gif, svg, pdf, ods, odt, doc, docx, xls, xlsx'` if it is not defined
- set `max_upload_size` to 4MB if it is not defined
- restrict collection helper functions/routes, that bypass group acl (used by collection links, OK for pure api usage, but a security no-go in the admin ui)
    - `find` and `_find`
    - `tree`
    - `_collections`
- disable helper routes that bypass ACLs completely
    - `/collecitons/utils/getLinkedOverview`
- restrict account helper function/route `/accounts/find`
    - disable the whole user list for non-admins
    - return user data only if it is filtered by id
    - return only needed data (user, name, group, \_id) and not the personal email addresses
- new acl rule `assets` - if not enabled, the user group can't access the assetsmanager

### Cosmetics

[](#cosmetics)

- disable the timer widget in the dashboard
- set the default entries group in entry edit view to "Main" (the default is "All") - If you split the fields in categories, e. g. SEO and config, it is a bit annoying to see the whole list on startup
- add some BIG, coloured language buttons to the action panel (I always forget to switch back after changing some localized values)
- set entity encoding of wysiwyg fields to raw to prevent special chars replacements (`ä` turns to `&auml;`), so the full text search for words with special chars works like intended
- add a dark mode toggle to the system menu

### Helpers

[](#helpers)

- disable entry lock functionality - While developing and testing with multiple browsers it is really annoying to wait until the entry is unlocked. Also my Firefox is setup with some privacy settings, so it never sends the unlock signal when closing a tab or clicking on "Cancel".

Example configuration
---------------------

[](#example-configuration)

config.php:

```
return [
    "app.name" => "rljUtils Test",
    "languages" => [
        "default" => "English",
        "de"      => "Deutsch",
    ],

    "groups" => [
        "manager" => [
            "cockpit" => [
                "backend" => true,
                "accounts" => true,
                "assets" => true,
            ],
        ],
        "author" => [
            "cockpit" => [
                "backend" => true,
                "assets" => true,
            ],
        ],
        "guest" => [
            "cockpit" => [
                "backend" => true,
            ],
        ],
    ],

    "rljutils" => [
        'hardening' => [
            'allowed_uploads'           => false,
            'max_upload_size'           => false,
            'collections_find'          => false,
            'collections_tree'          => false,
            'collections_collections'   => false,
            'accounts_find'             => false,
            'assetsmanager'             => false,
            'disable_getLinkedOverview' => false,
        ],
        'cosmetics' => [
            'widgets_timer_disabled'    => false,
            'entry_default_group_main'  => false,
            'entry_language_buttons'    => false,
            'wysiwyg_entity_encoding_raw' => false,
            'dark_mode_switch'          => false,
            'display_sortable_entries'  => false,
            'autofocus_login'           => false,
        ],
        'helpers' => [
            // entry lock is annoying while developing and testing with multiple browsers
            'locked_entries_disabled'   => true,
            'log_exceptions'            => false,
        ],
    ],
];
```

Screenshots
-----------

[](#screenshots)

[![rljUtils-language-buttons](https://user-images.githubusercontent.com/13042193/56857119-d951a580-6969-11e9-9b9f-15bd2ff3582f.png)](https://user-images.githubusercontent.com/13042193/56857119-d951a580-6969-11e9-9b9f-15bd2ff3582f.png)

[![rljUtils-settings](https://user-images.githubusercontent.com/13042193/56857120-d951a580-6969-11e9-8947-188b6f1fdd0b.png)](https://user-images.githubusercontent.com/13042193/56857120-d951a580-6969-11e9-8947-188b6f1fdd0b.png)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~213 days

Total

5

Last Release

1239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef4edcadbb34e2b59a6e5320ea13b3e53b8c9d3ba08f4387f479f11cfa7d950b?d=identicon)[raffaelj](/maintainers/raffaelj)

---

Top Contributors

[![raffaelj](https://avatars.githubusercontent.com/u/13042193?v=4)](https://github.com/raffaelj "raffaelj (36 commits)")

---

Tags

cockpitdark-themehardeningcosmetics

### Embed Badge

![Health badge](/badges/raffaelj-cockpit-rljutils/health.svg)

```
[![Health](https://phpackages.com/badges/raffaelj-cockpit-rljutils/health.svg)](https://phpackages.com/packages/raffaelj-cockpit-rljutils)
```

###  Alternatives

[composer/installers

A multi-framework Composer library installer

1.4k136.0M6.0k](/packages/composer-installers)[picocss/pico

Minimal CSS Framework for semantic HTML.

16.5k14.5k4](/packages/picocss-pico)

PHPackages © 2026

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