hscstudio / yii2-mimin Goto Github PK
View Code? Open in Web Editor NEWSimple RBAC Manager for Yii2 (minify of yii2-admin)
Simple RBAC Manager for Yii2 (minify of yii2-admin)
Menu tidak tampil saat permission diset * (semua di ijinkan) tidak satu per satu menu diset.
hasil debug sementara bahwa Mimin::checkRoute
hanya melakukan check pada route yang diberikan, tanpa melakukan check terhadap parent route yang ada, sehingga jika permission yang di berikan adalah /admin/*
sedangkan yang di cek adalah /admin/user/index
maka menjadi return false
;
How to assign role to user ?
gan, cara integrasi yii2-mimin dengan adminlte gimana ya? apa yang perlu diubah? kalau ada tutorialnya mohon link nya gan. sudah cari di google belum nemu nih. makasih..
`
hscstudio\mimin\controllers\RouteController::getRouteRecrusive | Object configuration must be an array containing a "class" or "__class" element./app/vendor/hscstudio/yii2-mimin/controllers/RouteController.php:265/app/vendor/hscstudio/yii2-mimin/controllers/RouteController.php:230/app/vendor/hscstudio/yii2-mimin/controllers/RouteController.php:184 |
---|
`
Error pada Controller RouteController fungsi getRouteRecrusive
PHP 7.4
Yii 2.0.38
Kindly add User table in your migration command
it is not exists in Yii2 Basic.
So add it
https://github.com/yiisoft/yii2-app-advanced/blob/master/console/migrations/m130524_201442_init.php
Asalamulaikum uncle hafid,
I want to ask, if i have 2 roles for admin and customer.
Because now, customer can access but if he clicked menu customer he get forbiden page.
How i can prevent customer cannot be access backend?
if customer access backend, then redirect to page not found.
Thanks,
Zeihan Aulia
work when replace on :
$tableOptions = null;
$this->createTable('{{%route}}', [
'name' => Schema::TYPE_STRING . '(64) NOT NULL',
'alias' => Schema::TYPE_STRING . '(64) NOT NULL',
'type' => Schema::TYPE_STRING . '(64) NOT NULL',
'status' => Schema::TYPE_SMALLINT . ' NOT NULL',
'PRIMARY KEY (name)'
], $tableOptions);
But I not set status default value to 1.
Assalamualaikum mas Hafid,
saya menggunakan advance template, ketika ingin generate route hanya yang ada dibackend saja yang tergenerate, sedangkan yang di frontend tidak.
Terima Kasih
Terjadi masalah saat menggunakan prefix table, di mana nama tabel yang terdapat di mimin tidak mengggunakan pattern untuk support prefix tabel.
public static function tableName() { return 'route'; }
mohon untuk diupdate. Misal
public static function tableName() { return '{{%route}}'; }
Since php 7.2 Object has become reserved word
Dear Bang Hafid,
Saat update password user, password baru tidak bisa saat login.
User masih bias login menggunakan password lama.
Mungkin di old_password . CMIIW ...
Thanks buat mimin yang keren ini
Salam
Please check this code
https://github.com/hscstudio/yii2-mimin/blob/master/views/user/index.php#L52
i think, this code missing attribute ->status
Assalamualaikum Uncle hafid,
thanks for your good work with this extention, but i found little problems with your extentions.
i have 2 role (admin and guest). but when i see view role for guest the checkbox check same like role for admin. i think its because $permission = $auth->getPermission($alias->name);
not include role filter. https://github.com/hscstudio/yii2-mimin/blob/master/views/role/view.php#L68
so i change that code like this:
$autItemChild = AuthItemChild::find()
->where(['parent'=>$model->name,'child'=>$alias->name])
->exists();
$checked = false;
if($autItemChild) $checked = true;
i added model for AuthItemChild.
and now, its work's as supposed, can you consider to implement it or you have better solution to solved this issue.
Thanks,
Zeihan Aulia
Menu pada tingkat kedua dapat di filter tapi ketika menu pada tingkat ke tiga tidak hilang, hanya muncul forbidden ketika di klik.
Class hscstudio\yii2-mimin\components\AccessControl does not exist.
Yii2 2.0.6 basic.
$config = [
...
'as access' => [
'class' => 'hscstudio\mimin\components\AccessControl',
'allowActions' => [
// add wildcard allowed action here!
'site/',
'debug/',
'mimin/*', // only in dev mode
],
]
tampilan pada saat assign route(permission) ke role banyak yg double dikarenakan penggunaan distinct yang tidak tepat
fix :
$types = Route::find()->select('type')->distinct()->where(['status' => 1])->all();
atau
$types = Route::find()->where(['status' => 1])->groupBy('type')->all();
Assalamualaikum mas Hafid,
untuk perubahan ini #17 sepertinya belum terupdate di tag v1.1.3 saya tadi baru install mimin masih tidak bisa update password.
Terima Kasih
Mimin::checkRoute('<controller/action>') return true if you've allowed any action for this controller or controller whose name starts with the same.
Fro example:
You have routes:
/client/*
/client/create
/client/view
/client-source/*
You allow access to /client/create and to/client-source/*, but if you check Mimin::checkRoute('/client/view') it returned true (.
I think it hppen there https://github.com/hscstudio/yii2-mimin/blob/master/components/Mimin.php#L37
Because AuthItem::find()->where('name LIKE :param')->addParams([':param' => $parent.'%'])->all() get
all where exist "/client%" -> "/client/create" and "/client-source/*"...
Yii Migration Tool (based on Yii v2.0.7-dev)
Total 1 new migration to be applied:
m151027_142811_create_route_tableApply the above migration? (yes|no) [no]:yes
*** applying m151027_142811_create_route_table
PHP Parse Error 'yii\base\ErrorException' with message 'syntax error, unexpected
',''in C:\xampp\htdocs\cobalagi\vendor\hscstudio\yii2-mimin\migrations\old\m151027_1
42811_create_route_table.php:22Stack trace:
0 [internal function]: yii\base\ErrorHandler->handleFatalError()
1 {main}
Hi, I'm unable to generate routes (using the "Generate Route" button) for all controllers & actions which are inside modules.
โ ... git:(feature-mimin-rbac) โ yii migrate --migrationPath=@hscstudio/mimin/migrations
Yii Migration Tool (based on Yii v2.0.6)
Total 1 new migration to be applied:
m151024_072453_create_route_table
Apply the above migration? (yes|no) [no]:yes
*** applying m151024_072453_create_route_table
Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: yii\db\ColumnSchemaBuilder::primaryKey()'
in .../vendor/yiisoft/yii2/base/Object.php:220
Stack trace:
#0 .../vendor/hscstudio/yii2-mimin/migrations/m151024_072453_create_route_table.php(17): yii\base\Object->_call('primaryKey', Array)
#1 .../vendor/hscstudio/yii2-mimin/migrations/m151024_072453_create_route_table.php(17): yii\db\ColumnSchemaBuilder->primaryKey()
#2 .../vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(492): m151024_072453_create_route_table->up()
#3 .../vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(129): yii\console\controllers\BaseMigrateController->migrateUp('m151024_072453...')
#4 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#5 .../vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#6 .../vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#7 .../vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('', Array)
#8 .../vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('', Array)
#9 .../vendor/yiisoft/yii2/console/Application.php(167): yii\base\Module->runAction('migrate', Array)
#10 .../vendor/yiisoft/yii2/console/Application.php(143): yii\console\Application->runAction('migrate', Array)
#11 .../vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#12 .../yii(27): yii\base\Application->run()
#13 {main}
php: 5.4.45
yii2: 2.0.6
os: mac os
Means all string using Yii::t() function to translate. and change translation category yii
to your project name mimin
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.