Skip to content

Commit dad0e0a

Browse files
authored
Add missing “authorize” calls in Organizations#new and #create (#362)
1 parent 3fb95b4 commit dad0e0a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/controllers/web/organizations_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def index; end
88
# GET /organizations/new
99
def new
1010
@organization = Organization.new
11+
authorize! :create, @organization
1112
end
1213

1314
# GET /organizations/:id/edit
@@ -16,6 +17,7 @@ def edit; end
1617
# POST /organizations
1718
def create
1819
@organization = Organization.new(organization_params)
20+
authorize! :create, @organization
1921

2022
if @organization.save
2123
redirect_to web_organizations_path, notice: t('.notice')

0 commit comments

Comments
 (0)