mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 19:14:11 +00:00
Providers sharing (#1273)
* third party provider scoping * Simplify logic and allow only admins to mange providers * Broadcast fixes * FIX tests and build * Fixes * Reviews * Scope merchants * DRY fixes
This commit is contained in:
@@ -107,12 +107,6 @@ class PropertiesController < ApplicationController
|
||||
end
|
||||
|
||||
def require_property_write_permission!
|
||||
permission = @account.permission_for(Current.user)
|
||||
unless permission.in?([ :owner, :full_control ])
|
||||
respond_to do |format|
|
||||
format.html { redirect_back_or_to account_path(@account), alert: t("accounts.not_authorized") }
|
||||
format.turbo_stream { stream_redirect_back_or_to(account_path(@account), alert: t("accounts.not_authorized")) }
|
||||
end
|
||||
end
|
||||
require_account_permission!(@account)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user