Added template editor separate role
This commit is contained in:
@@ -17,7 +17,7 @@ class TemplateController extends Controller
|
||||
|
||||
public function create(CreateTemplateRequest $request)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
$this->authorize('create', Template::class);
|
||||
|
||||
// Create template
|
||||
$template = $request->getTemplate();
|
||||
@@ -28,5 +28,4 @@ class TemplateController extends Controller
|
||||
'template_id' => $template->id
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ class UserResource extends JsonResource
|
||||
'is_subscribed' => $this->is_subscribed,
|
||||
'has_enterprise_subscription' => $this->has_enterprise_subscription,
|
||||
'admin' => $this->admin,
|
||||
'template_editor' => $this->template_editor,
|
||||
'has_customer_id' => $this->has_customer_id,
|
||||
'has_forms' => $this->has_forms,
|
||||
] : [];
|
||||
|
||||
Reference in New Issue
Block a user