Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Udated installers #387

Merged
merged 44 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0a08b90
changed installer User package
Kim-the-Diamond Mar 7, 2024
d1790ec
Fix styling
Kim-the-Diamond Mar 7, 2024
816db98
shield
Kim-the-Diamond Mar 7, 2024
eaccc1e
Fix styling
Kim-the-Diamond Mar 7, 2024
5fca06c
deleted migrations
Kim-the-Diamond Mar 7, 2024
e51e977
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
1fe70da
cleanup AdminPanelProvider
Kim-the-Diamond Mar 7, 2024
b0e3671
Fix styling
Kim-the-Diamond Mar 7, 2024
1012b76
Updated sync package
Kim-the-Diamond Mar 7, 2024
9e90d7d
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
4ac019b
Update update_user_table.php.stub
Kim-the-Diamond Mar 7, 2024
b4e1195
cleanup config
Kim-the-Diamond Mar 7, 2024
493db8f
install user
Kim-the-Diamond Mar 7, 2024
4fec4c8
Fix styling
Kim-the-Diamond Mar 7, 2024
67330eb
Updated InstallComman in Press
Kim-the-Diamond Mar 7, 2024
6c82b5e
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
529778d
Update InstallCommand in Page
Kim-the-Diamond Mar 7, 2024
0b45d9a
Update press.php
Kim-the-Diamond Mar 7, 2024
03c350a
Update InstallCommand.php
Kim-the-Diamond Mar 7, 2024
35b703e
Merge branch 'main' into feature/installer
adrolli Mar 7, 2024
e82a842
Packges Jobs/ Core/ Builder InstallerCommand Updated
Kim-the-Diamond Mar 7, 2024
2aa4a23
Fix styling
Kim-the-Diamond Mar 7, 2024
82bf5ce
updated all packages InstallCommands with camelcase function names
Kim-the-Diamond Mar 7, 2024
94e6734
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
b7682ab
Updated all packages InstallCommand => callSilent()
Kim-the-Diamond Mar 7, 2024
69536d2
Cleanup PressPlugin
Kim-the-Diamond Mar 7, 2024
74c8546
Clenup Press Package
Kim-the-Diamond Mar 7, 2024
e03fb94
Fix styling
Kim-the-Diamond Mar 7, 2024
b3088c0
Update PressResource.php
Kim-the-Diamond Mar 7, 2024
5bbaecb
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
26f8c0a
updated Jobs
Kim-the-Diamond Mar 7, 2024
5878205
Testes Install command
Kim-the-Diamond Mar 7, 2024
672dab2
Fix styling
Kim-the-Diamond Mar 7, 2024
d5f35fc
Update JobManager.php
Kim-the-Diamond Mar 7, 2024
5d9f248
Merge branch 'feature/installer' of https://github.com/mooxphp/moox i…
Kim-the-Diamond Mar 7, 2024
6bb8079
Update FailedJob.php
Kim-the-Diamond Mar 7, 2024
c826c10
Fix styling
Kim-the-Diamond Mar 7, 2024
cb52a2e
Jobs V3 w-i-p
adrolli Mar 7, 2024
32385ca
Jobs V3 FailedJobs phpstan issue
adrolli Mar 7, 2024
afdaabf
Jobs V3 phpstan fix
adrolli Mar 7, 2024
f547f9e
Debug Jobs
adrolli Mar 8, 2024
1190a09
Fix styling
adrolli Mar 8, 2024
6270760
Jobs V3 fix db
adrolli Mar 8, 2024
0faa710
Jobs V3 last fix to merge
adrolli Mar 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions app/Policies/ActivityLogPolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php

namespace App\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Moox\Audit\Models\ActivityLog;

class ActivityLogPolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_audit');
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, ActivityLog $activityLog): bool
{
return $user->can('view_audit');
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_audit');
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, ActivityLog $activityLog): bool
{
return $user->can('update_audit');
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ActivityLog $activityLog): bool
{
return $user->can('delete_audit');
}

/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_audit');
}

/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, ActivityLog $activityLog): bool
{
return $user->can('force_delete_audit');
}

/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_audit');
}

/**
* Determine whether the user can restore.
*/
public function restore(User $user, ActivityLog $activityLog): bool
{
return $user->can('restore_audit');
}

/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_audit');
}

/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, ActivityLog $activityLog): bool
{
return $user->can('replicate_audit');
}

/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_audit');
}
}
108 changes: 108 additions & 0 deletions app/Policies/ItemPolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php

namespace App\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Moox\Builder\Models\Item;

class ItemPolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_builder');
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, Item $item): bool
{
return $user->can('view_builder');
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_builder');
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, Item $item): bool
{
return $user->can('update_builder');
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Item $item): bool
{
return $user->can('delete_builder');
}

/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_builder');
}

/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Item $item): bool
{
return $user->can('force_delete_builder');
}

/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_builder');
}

/**
* Determine whether the user can restore.
*/
public function restore(User $user, Item $item): bool
{
return $user->can('restore_builder');
}

/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_builder');
}

/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Item $item): bool
{
return $user->can('replicate_builder');
}

/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_builder');
}
}
108 changes: 108 additions & 0 deletions app/Policies/PlatformPolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?php

namespace App\Policies;

use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Moox\Sync\Models\Platform;

class PlatformPolicy
{
use HandlesAuthorization;

/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_platform');
}

/**
* Determine whether the user can view the model.
*/
public function view(User $user, Platform $platform): bool
{
return $user->can('view_platform');
}

/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_platform');
}

/**
* Determine whether the user can update the model.
*/
public function update(User $user, Platform $platform): bool
{
return $user->can('update_platform');
}

/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Platform $platform): bool
{
return $user->can('delete_platform');
}

/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_platform');
}

/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Platform $platform): bool
{
return $user->can('force_delete_platform');
}

/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_platform');
}

/**
* Determine whether the user can restore.
*/
public function restore(User $user, Platform $platform): bool
{
return $user->can('restore_platform');
}

/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_platform');
}

/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Platform $platform): bool
{
return $user->can('replicate_platform');
}

/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_platform');
}
}
Loading