fix: members cannot manage subscriptions
This commit is contained in:
		@@ -15,6 +15,9 @@ class Index extends Component
 | 
				
			|||||||
        if (!isCloud()) {
 | 
					        if (!isCloud()) {
 | 
				
			||||||
            return redirect(RouteServiceProvider::HOME);
 | 
					            return redirect(RouteServiceProvider::HOME);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (auth()->user()->isMember()) {
 | 
				
			||||||
 | 
					            return redirect()->route('dashboard');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (data_get(currentTeam(), 'subscription') && isSubscriptionActive()) {
 | 
					        if (data_get(currentTeam(), 'subscription') && isSubscriptionActive()) {
 | 
				
			||||||
            return redirect()->route('subscription.show');
 | 
					            return redirect()->route('subscription.show');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,6 +11,9 @@ class Show extends Component
 | 
				
			|||||||
        if (!isCloud()) {
 | 
					        if (!isCloud()) {
 | 
				
			||||||
            return redirect()->route('dashboard');
 | 
					            return redirect()->route('dashboard');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (auth()->user()->isMember()) {
 | 
				
			||||||
 | 
					            return redirect()->route('dashboard');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (!data_get(currentTeam(), 'subscription')) {
 | 
					        if (!data_get(currentTeam(), 'subscription')) {
 | 
				
			||||||
            return redirect()->route('subscription.index');
 | 
					            return redirect()->route('subscription.index');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@ return [
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // The release version of your application
 | 
					    // The release version of your application
 | 
				
			||||||
    // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
 | 
					    // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
 | 
				
			||||||
    'release' => '4.0.0-beta.250',
 | 
					    'release' => '4.0.0-beta.251',
 | 
				
			||||||
    // When left empty or `null` the Laravel environment will be used
 | 
					    // When left empty or `null` the Laravel environment will be used
 | 
				
			||||||
    'environment' => config('app.env'),
 | 
					    'environment' => config('app.env'),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
return '4.0.0-beta.250';
 | 
					return '4.0.0-beta.251';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "coolify": {
 | 
					    "coolify": {
 | 
				
			||||||
        "v4": {
 | 
					        "v4": {
 | 
				
			||||||
            "version": "4.0.0-beta.250"
 | 
					            "version": "4.0.0-beta.251"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user