summaryrefslogtreecommitdiff
path: root/app/controllers/teams_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/teams_controller.rb')
-rw-r--r--app/controllers/teams_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb
index 57b3d91..6abc74c 100644
--- a/app/controllers/teams_controller.rb
+++ b/app/controllers/teams_controller.rb
@@ -1,5 +1,4 @@
class TeamsController < ApplicationController
- before_action :set_team, only: [:show, :edit, :update, :destroy]
# GET /teams
# GET /teams.json
@@ -71,4 +70,8 @@ class TeamsController < ApplicationController
def team_params
params[:team]
end
+
+ def is_owner?(object)
+ object.users.include?(current_user)
+ end
end