FIX: fix some security issue

This commit is contained in:
Michal Kváček
2016-01-22 12:46:18 +01:00
parent 39855bdbfd
commit 551e1af5fe
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ class CreateNewUser extends Request
*/
public function authorize()
{
return \Auth::$user->role == User::ROLE_ADMIN;
return \Auth::check() && \Auth::$user->role == User::ROLE_ADMIN;
}
/**