Download the PHP package freddokresna/yii2-admin-fkresna without Composer

On this page you can find all versions of the php package freddokresna/yii2-admin-fkresna. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-admin-fkresna

RBAC Admin for Yii 2

Admin module untuk mengelola RBAC Yii 2 melalui antarmuka web. Modul ini menyediakan pengelolaan user, assignment, role, permission, route, rule, dan menu.

Repository ini adalah package freddokresna/yii2-admin-fkresna. Namespace PHP tetap mdm\admin agar kompatibel dengan konfigurasi dan kode yang sudah menggunakan ekstensi mdmsoft/yii2-admin.

Persyaratan

Instalasi

Pasang menggunakan Composer:

Package ini otomatis menggunakan PSR-4 namespace mdm\admin. Tidak perlu menambahkan alias secara manual saat dipasang dengan Composer.

Konfigurasi

Tambahkan modul dan RBAC manager ke konfigurasi aplikasi, misalnya config/web.php:

yii\rbac\DbManager juga dapat digunakan. mdm\admin\components\DbManager merupakan implementasi yang mewarisi yii\rbac\DbManager.

Jika aplikasi belum memiliki access control, tambahkan behavior berikut pada konfigurasi aplikasi atau controller/module yang sesuai. Sesuaikan allowActions dengan route publik aplikasi:

Migrasi database

Untuk menyimpan RBAC pada database, jalankan migrasi bawaan Yii:

Migrasi modul membuat tabel menu dan tabel user (jika fitur user management digunakan). Jalankan:

Secara default tabel yang digunakan adalah {{%menu}} dan {{%user}}. Koneksi, nama tabel, cache, status user default, dan opsi lain dapat diubah melalui parameter aplikasi:

Akses halaman admin

Dengan route standar Yii, halaman modul tersedia di:

Jika menggunakan pretty URL, route yang sama dapat diakses sebagai /admin, /admin/role, dan seterusnya.

Keamanan (SECURITY)

Penting: Helper::filter(), Helper::filterActionColumn(), dan MenuHelper::getAssignedMenu() bukan kontrol akses. Ketiganya hanya menyembunyikan/memfilter elemen UI (menu, tombol) berdasarkan hasil pengecekan route. Endpoint di balik elemen tersebut tetap dapat diakses langsung melalui URL oleh siapa pun yang mengetahui route-nya — menyembunyikan menu tidak pernah menggantikan penegakan akses di sisi server.

Semua endpoint (termasuk halaman modul admin ini) WAJIB dilindungi dengan memasang behavior as access pada konfigurasi aplikasi, modul, atau controller yang bersangkutan:

Tanpa as access, tidak ada komponen yang memeriksa izin RBAC, sehingga halaman admin dan route lain terbuka untuk siapa pun yang sudah login (atau bahkan tamu, tergantung konfigurasi).

Peringatan opsi onlyRegisteredRoute

Opsi mdm.admin.configs.onlyRegisteredRoute (default false) mengubah perilaku AccessControl secara signifikan:

Jangan mengaktifkan onlyRegisteredRoute hanya untuk menghindari repot mendaftarkan route — akibatnya adalah celah akses yang tidak terlihat. Pertahankan false dan daftarkan permission/route secara eksplisit.

Penyesuaian user model

Controller assignment dapat disesuaikan melalui controllerMap:

Fitur user management bawaan menggunakan mdm\admin\models\User. Jika aplikasi memiliki user model sendiri, atur identityClass pada komponen user dan gunakan userClassName/field yang sesuai. Detail extraColumns, searchClass, layout, menu, dan penggunaan MenuHelper tersedia di dokumentasi.

Dokumentasi

Menjalankan test

Dependensi pengujian sudah didefinisikan pada require-dev. Dari root repository, jalankan:

Suite unit memakai yii\rbac\DbManager sungguhan (validasi AuthItem + save, filter menu Helper::filter) sehingga butuh database — tetapi default-nya SQLite (@runtime/mdm_admin_test.sqlite, tabel RBAC dibuat ulang otomatis oleh test), jadi perintah di atas langsung hijau di lingkungan bersih tanpa server database apa pun. Untuk memakai MySQL/PostgreSQL lokal atau di CI, set env MDM_ADMIN_TEST_DB=mysql (atau pgsql), buat database-nya dengan tests/codeception/bin/create-test-db.sh (kredensial dibaca dari env, tidak ada secret di-hardcode di repo), lalu jalankan perintah yang sama. Kredensial koneksi dapat dioverride lewat tests/codeception/config/db-local.php (gitignored). Detail di tests/README.md.

Catatan (2026-09): suite functional & acceptance gaya codeception-v2 yang bergantung yiisoft/yii2-codeception (abandoned) telah dihapus karena tidak dapat dijalankan pada codeception ^5. Uji perilaku web/RBAC sebaiknya dilakukan lewat unit test dengan Yii::$app + mock, atau migration host app.

Lisensi

BSD-3-Clause. Lihat LICENSE.


Quality Improvement

Proyek ini menjalani Quality Improvement Loop otomatis setiap cycle:

  1. Phase 1 — UI/UX Designer: Audit layout, typography, colors, spacing, accessibility
  2. Phase 2 — QA Agent: Audit crash potential, null pointer, race conditions, logic errors
  3. Phase 3 — Engineer: Fix semua issue di code + static analysis + commit ke git
  4. Phase 4 — Documentation: Update CHANGELOG.md dan dokumentasi fitur

Cycle terakhir: Cycle 1 — 2026-09-08


All versions of yii2-admin-fkresna with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4.0
yiisoft/yii2 Version ^2.0.55
yiisoft/yii2-bootstrap5 Version ^2.0.51
twbs/bootstrap-icons Version ^1.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package freddokresna/yii2-admin-fkresna contains the following files

Loading the files please wait ...