]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/User.php
remove absurd admin permissions
[alttp.git] / app / Models / User.php
index e5bb4f174b49b5f2a96446627ab0148421f7f725..0c2dcf76b0aaaf307c4591f35dc6d2f618b9019e 100644 (file)
@@ -56,6 +56,14 @@ class User extends Authenticatable
                return false;
        }
 
+       public function hasFinished(Round $round) {
+               foreach ($round->results as $result) {
+                       if ($result->user_id != $this->id) continue;
+                       return $result->has_finished;
+               }
+               return false;
+       }
+
 
        public function participation() {
                return $this->hasMany(Participant::class);