Skip to content

Commit 49b286c

Browse files
committed
Demo mode: Updated my account access to be more selective
1 parent e006f96 commit 49b286c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/Users/Controllers/UserAccountController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function __construct(
2020
) {
2121
$this->middleware(function (Request $request, Closure $next) {
2222
$this->preventGuestAccess();
23-
$this->preventAccessInDemoMode();
2423
return $next($request);
2524
});
2625
}
@@ -53,6 +52,8 @@ public function showProfile()
5352
*/
5453
public function updateProfile(Request $request, ImageRepo $imageRepo)
5554
{
55+
$this->preventAccessInDemoMode();
56+
5657
$user = user();
5758
$validated = $this->validate($request, [
5859
'name' => ['min:2', 'max:100'],
@@ -143,6 +144,7 @@ public function showNotifications(PermissionApplicator $permissions)
143144
*/
144145
public function updateNotifications(Request $request)
145146
{
147+
$this->preventAccessInDemoMode();
146148
$this->checkPermission('receive-notifications');
147149
$data = $this->validate($request, [
148150
'preferences' => ['required', 'array'],
@@ -178,6 +180,8 @@ public function showAuth(SocialAuthService $socialAuthService)
178180
*/
179181
public function updatePassword(Request $request)
180182
{
183+
$this->preventAccessInDemoMode();
184+
181185
if (config('auth.method') !== 'standard') {
182186
$this->showPermissionError();
183187
}

0 commit comments

Comments
 (0)