Esempio n. 1
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     // the user must be verified
     $user = Request::user();
     // there must NOT be a grader for the user
     $grader = Grader::where('user_id', $user->id)->first();
     return $user && $user->verified && !$user->hasRole('grader_a');
 }
Esempio n. 2
0
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     // the user must be verified
     $user = Request::user();
     return $user && $user->verified && $user->suggestion->accepted == 'yes';
 }
 /**
  * Determine if the user is authorized to make this request.
  *
  * @return bool
  */
 public function authorize()
 {
     // the user must be verified
     $user = Request::user();
     return $user && $user->verified;
 }