Welcome Guest, Not a member yet? Register   Sign In
Using shield, How i can redirect to separate url if the user not in admin group
#1

Hello,
I'm working with codeigniter shield package for authorization and i want to restrict  normal user to access the administration controllers which is not in admin group. but everything works perfect, it redirects to index page if the user not in admin group. but i want to to redirect them to seperate page instead of redirecting to the index page.

Below is my code in Routes.php 

Code:
$routes->group("admin", ["namespace" => "\Admin\Controllers", "filter" => "group:admin"], static function ($routes) {



    $routes->get('entities', 'Entities::index');
    $routes->post('entities/create', 'Entities::create');

});


How i can redirect to seperate page ?

Thanks
Reply


Messages In This Thread
Using shield, How i can redirect to separate url if the user not in admin group - by sknair143 - 08-15-2023, 03:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB