team members limitation frontend/backend

This commit is contained in:
Čarodej
2021-11-26 10:53:30 +01:00
parent 5626a054da
commit 459087337c
16 changed files with 335 additions and 66 deletions

View File

@@ -26,7 +26,7 @@ class TeamFolderInvitationFactory extends Factory
'parent_id' => $this->faker->uuid,
'inviter_id' => $this->faker->uuid,
'email' => $this->faker->email,
'permission' => $this->faker->randomElement(['can-edit', 'can-view', 'can-view-and-download']),
'permission' => $this->faker->randomElement(['can-edit', 'can-view']),
'status' => $this->faker->randomElement(['pending', 'accepted', 'rejected']),
];
}

View File

@@ -0,0 +1,30 @@
<?php
namespace Database\Factories;
use Domain\Teams\Models\TeamFolderMember;
use Illuminate\Database\Eloquent\Factories\Factory;
class TeamFolderMemberFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = TeamFolderMember::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'parent_id' => $this->faker->uuid,
'user_id' => $this->faker->uuid,
'permission' => $this->faker->randomElement(['can-edit', 'can-view', 'owner']),
];
}
}