Re: How to set Authorization wise view in the Form in CakePHP-3.0

2015-05-28 Thread Md Bayezid Alam
Thanks a lot. its working now. Is there any other easiest way to do so? On Thu, May 28, 2015 at 8:50 PM, euromark wrote: > check() and comparison is really a bad idea > the first returns bool, how should that ever === to a string? > wrapping that with !empty() makes this completely wrong > > if(

Re: How to set Authorization wise view in the Form in CakePHP-3.0

2015-05-28 Thread euromark
check() and comparison is really a bad idea the first returns bool, how should that ever === to a string? wrapping that with !empty() makes this completely wrong if(!empty($this->request->session()->check('Auth.User.role') === 'superadmin')){ Try if ($this->request->session()->read('Auth.User.

How to set Authorization wise view in the Form in CakePHP-3.0

2015-05-28 Thread Md Bayezid Alam
Hi All, I want to set an authorization in the registration of a form using CakePHP 3.0. Before asking here, i tried below things but no luck in my favor. Suppose i have role field in the usersTable like 'superuser', 'admin', 'user'. I want to provide permission superuser to make all the things