mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-15 01:35:02 +00:00
- Frontend restriction shared page
This commit is contained in:
@@ -43,4 +43,9 @@ class DefaultRestrictionsEngine implements RestrictionsEngine
|
||||
{
|
||||
return resolve(CheckMaxTeamMembersLimitAction::class)($user, $newInvites);
|
||||
}
|
||||
|
||||
public function canVisitShared(User $user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,9 @@ class FixedBillingRestrictionsEngine implements RestrictionsEngine
|
||||
{
|
||||
return resolve(CheckMaxTeamMembersLimitAction::class)($user, $newInvites);
|
||||
}
|
||||
|
||||
public function canVisitShared(User $user): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,10 @@ class MeteredBillingRestrictionsEngine implements RestrictionsEngine
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function canVisitShared(User $user): bool
|
||||
{
|
||||
// Disable share visit when user has more than 3 failed payments
|
||||
return ! ($user->failedPayments()->count() >= 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,6 @@ interface RestrictionsEngine
|
||||
public function canCreateTeamFolder(User $user): bool;
|
||||
|
||||
public function canInviteTeamMembers(User $user, array $newInvites = []): bool;
|
||||
|
||||
public function canVisitShared(User $user): bool;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user