Skip to content

Commit

Permalink
Bump laravel/pint from 1.18.3 to 1.19.0 (#1742)
Browse files Browse the repository at this point in the history
* Bump laravel/pint from 1.18.3 to 1.19.0

Bumps [laravel/pint](https://github.com/laravel/pint) from 1.18.3 to 1.19.0.
- [Release notes](https://github.com/laravel/pint/releases)
- [Changelog](https://github.com/laravel/pint/blob/main/CHANGELOG.md)
- [Commits](laravel/pint@v1.18.3...v1.19.0)

---
updated-dependencies:
- dependency-name: laravel/pint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix cs

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Weirich <[email protected]>
  • Loading branch information
dependabot[bot] and SamuelWei authored Jan 6, 2025
1 parent 356ca24 commit 67ab1c6
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 122 deletions.
2 changes: 1 addition & 1 deletion app/Auth/Shibboleth/ShibbolethProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function logout($redirect)
*/
public function frontChannelLogout(string $returnUrl)
{
//Only destroy application cookie via front channel and destroy the application session via back channel
// Only destroy application cookie via front channel and destroy the application session via back channel

if (\Auth::user()?->authenticator == 'shibboleth') {
\Auth::logout();
Expand Down
8 changes: 4 additions & 4 deletions app/Http/Controllers/api/v1/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function index(ShowRoomsRequest $request)
$additionalMeta = [];

if ($request->only_favorites) {
//list if room favorites
// list if room favorites
$roomFavorites = Auth::user()->roomFavorites->modelKeys();
$collection = Room::whereIn('rooms.id', $roomFavorites);
} else {
Expand Down Expand Up @@ -166,7 +166,7 @@ public function store(CreateRoom $request)

$room->save();

//Create access code if activated for this room type
// Create access code if activated for this room type
if ($room->roomType->has_access_code_default) {
$room->access_code = random_int(111111111, 999999999);
}
Expand Down Expand Up @@ -369,15 +369,15 @@ public function transferOwnership(Room $room, TransferOwnershipRequest $request)
DB::beginTransaction();

try {
//delete the new owner from the members if he is a member of the room
// delete the new owner from the members if he is a member of the room
if ($room->members->contains($newOwner)) {
$room->members()->detach($newOwner);
}

$room->owner()->associate($newOwner);
$room->save();

//add old owner to the members
// add old owner to the members
if ($request->role) {
$room->members()->attach($oldOwner, ['role' => $request->role]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/StoreRoomFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class StoreRoomFile extends FormRequest
public function rules()
{
return [
'file' => ['required', 'file', 'max:'.(config('bigbluebutton.max_filesize') * 1000), 'mimes:'.config('bigbluebutton.allowed_file_mimes')], //https://github.com/bigbluebutton/bigbluebutton/blob/v2.2.x-release/bigbluebutton-html5/private/config/settings.yml
'file' => ['required', 'file', 'max:'.(config('bigbluebutton.max_filesize') * 1000), 'mimes:'.config('bigbluebutton.allowed_file_mimes')], // https://github.com/bigbluebutton/bigbluebutton/blob/v2.2.x-release/bigbluebutton-html5/private/config/settings.yml
];
}
}
8 changes: 4 additions & 4 deletions app/Http/Requests/TransferOwnershipRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ public function rules()
'user' => ['bail', 'required', 'integer', 'exists:App\Models\User,id',
function ($attribute, $value, $fail) {
$user = User::find($value);
//make sure that the given user is not the current owner of the room
// make sure that the given user is not the current owner of the room
if ($this->room->owner->is($user)) {
$fail(__('validation.custom.transfer_ownership.is_owner'));
}
//make sure that the given user can create/own rooms
// make sure that the given user can create/own rooms
if ($user->cannot('create', Room::class)) {
$fail(__('validation.custom.transfer_ownership.can_not_own_rooms'));
}
//make sure that the given user can own rooms with the room type of the given room
// make sure that the given user can own rooms with the room type of the given room
if (! Room::roomTypePermitted($user, $this->room->roomType)) {
$fail(__('validation.custom.transfer_ownership.invalid_room_type'));
}
//make sure that the given user has not reached the max. amount of rooms
// make sure that the given user has not reached the max. amount of rooms
if ($user->hasRoomLimitExceeded()) {
$fail(__('validation.custom.transfer_ownership.room_limit_exceeded'));
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/UpdateRoomSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function rules()

// Generate validation rules for all visible room settings
foreach (Room::ROOM_SETTINGS_DEFINITION as $setting => $config) {
//Expert mode for room is deactivated and setting is an expert setting: do not update setting
// Expert mode for room is deactivated and setting is an expert setting: do not update setting
if (! $this->expert_mode && $config['expert']) {
continue;
}
Expand Down
18 changes: 9 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/bigbluebutton.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
'max_filesize' => (int) env('BBB_MAX_FILESIZE', 30),
'allowed_file_mimes' => env('BBB_ALLOWED_FILE_MIMES', 'pdf,doc,docx,xls,xlsx,ppt,pptx,txt,rtf,odt,ods,odp,odg,odc,odi,jpg,jpeg,png'),
'welcome_message_limit' => (int) env('WELCOME_MESSAGE_LIMIT', 500), //max 5000
'welcome_message_limit' => (int) env('WELCOME_MESSAGE_LIMIT', 500), // max 5000
'room_name_limit' => (int) env('ROOM_NAME_LIMIT', 50),
'room_id_max_tries' => (int) env('BBB_ROOM_ID_MAX_TRIES', 1000),
'user_search_limit' => (int) env('USER_SEARCH_LIMIT', 10),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*/
public function up(): void
{
//get value for self reset enabled if it exists with the old name
// get value for self reset enabled if it exists with the old name
$value = DB::table('settings')->where('key', 'password_self_reset_enabled')->first();
if ($value != null) {
//delete setting with the old name and add setting with the new name and the value
// delete setting with the old name and add setting with the new name and the value
DB::table('settings')->where('key', 'password_self_reset_enabled')->delete();
DB::table('settings')->insert([
'key' => 'password_change_allowed',
Expand Down
2 changes: 1 addition & 1 deletion database/seeders/RolesAndPermissionsSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function run()
Permission::whereNotIn('id', $permissions)->delete();

// Setup permission inheritances
/// e.g. If you have permission x, you also get the permissions a,b,c
// / e.g. If you have permission x, you also get the permissions a,b,c
Permission::setIncludedPermissions('rooms.manage', ['rooms.create', 'rooms.viewAll']);

Permission::setIncludedPermissions('meetings.viewAny', ['rooms.viewAll']);
Expand Down
54 changes: 27 additions & 27 deletions tests/Backend/Feature/api/v1/Room/MembershipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function test_access_code_membership()

public function test_join_membership()
{
//Room types
// Room types
$roomTypeAllowMembershipEnforced = RoomType::factory()->create([
'allow_membership_default' => true,
'allow_membership_enforced' => true,
Expand Down Expand Up @@ -677,49 +677,49 @@ public function test_bulk_import_members()
$room->members()->attach($memberModerator, ['role' => RoomUserRole::MODERATOR]);
$room->members()->attach($memberCoOwner, ['role' => RoomUserRole::CO_OWNER]);

//Add single member acting as guest
// Add single member acting as guest
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertUnauthorized();

//Add single member acting as non owner
// Add single member acting as non owner
$this->actingAs($this->user)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertForbidden();

//Add single member acting as other member
// Add single member acting as other member
$this->actingAs($memberUser)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertForbidden();

//Add single member acting as moderator
// Add single member acting as moderator
$this->actingAs($memberModerator)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertForbidden();

//Add single member acting as co-owner
// Add single member acting as co-owner
$this->actingAs($memberCoOwner)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertNoContent();
$room->members()->detach($newUser->id);

//Add multiple member acting as co-owner
// Add multiple member acting as co-owner
$this->actingAs($memberCoOwner)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::USER])
->assertNoContent();
$room->members()->detach($newUser->id);
$room->members()->detach($newUser4->id);

//Add single member acting as owner
// Add single member acting as owner
$this->actingAs($owner)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => RoomUserRole::USER])
->assertNoContent();
$room->members()->detach($newUser->id);

//Add multiple member acting as owner
// Add multiple member acting as owner
$this->actingAs($owner)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::USER])
->assertNoContent();
$room->members()->detach($newUser->id);
$room->members()->detach($newUser4->id);

//Add single member with invalid role
// Add single member with invalid role
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email], 'role' => 10])
->assertJsonValidationErrors(['role']);

//Add multiple members as user
// Add multiple members as user
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::USER])
->assertNoContent();

Expand All @@ -736,62 +736,62 @@ public function test_bulk_import_members()
$room->members()->detach($newUser->id);
$room->members()->detach($newUser4->id);

//Add multiple members as moderator
// Add multiple members as moderator
$this->actingAs($owner)->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::MODERATOR])
->assertNoContent();
$room->members()->detach($newUser->id);
$room->members()->detach($newUser4->id);

//Add multiple members as co-owner
// Add multiple members as co-owner
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::CO_OWNER])
->assertNoContent();

//Add same members again
// Add same members again
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $newUser4->email], 'role' => RoomUserRole::CO_OWNER])
->assertJsonValidationErrors('user_emails.0')
->assertJsonValidationErrors('user_emails.1');
$room->members()->detach($newUser->id);
$room->members()->detach($newUser4->id);

//Add owner
// Add owner
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$owner->email], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.0');

//Add not existing user email
// Add not existing user email
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$invalidEmail], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.0');

//Add with input that is no email
// Add with input that is no email
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$noEmail], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.0');

//Add without input
// Add without input
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails');

//Add with to many emails
// Add with to many emails
$emailList = [];
for ($i = 0; $i < 1001; $i++) {
$emailList[] = $this->faker->unique()->email();
}
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => $emailList, 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails');

//Add without data
// Add without data
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), [])
->assertJsonValidationErrors('user_emails')
->assertJsonValidationErrors('role');

//Add 2 users with the same email
// Add 2 users with the same email
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser2->email, $newUser3->email], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.0')
->assertJsonValidationErrors('user_emails.1');

//Add 1 user with email that two users have
// Add 1 user with email that two users have
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser2->email], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.0');

//Add 1 valid and 1 invalid user
// Add 1 valid and 1 invalid user
$this->postJson(route('api.v1.rooms.member.bulkImport', ['room' => $room]), ['user_emails' => [$newUser->email, $invalidEmail], 'role' => RoomUserRole::USER])
->assertJsonValidationErrors('user_emails.1')
->assertJsonMissingValidationErrors('user_emails.0');
Expand Down Expand Up @@ -862,7 +862,7 @@ public function test_bulk_update_members()
['users' => [$newUser->id], 'role' => RoomUserRole::MODERATOR]
)->assertJsonValidationErrors(['users.0']);

//Update himself as owner
// Update himself as owner
$this->actingAs($owner)->putJson(
route('api.v1.rooms.member.bulkUpdate', ['room' => $room]),
['users' => [$owner->id], 'role' => RoomUserRole::MODERATOR]
Expand Down Expand Up @@ -901,7 +901,7 @@ public function test_bulk_update_members()
['users' => [$memberUser->id], 'role' => RoomUserRole::MODERATOR]
)->assertForbidden();

//Update self as user
// Update self as user
$this->actingAs($memberUser)->putJson(
route('api.v1.rooms.member.bulkUpdate', ['room' => $room]),
['users' => [$memberUser->id], 'role' => RoomUserRole::MODERATOR]
Expand All @@ -913,13 +913,13 @@ public function test_bulk_update_members()
['users' => [$memberUser->id], 'role' => RoomUserRole::MODERATOR]
)->assertForbidden();

//Update self as moderator
// Update self as moderator
$this->actingAs($memberModerator)->putJson(
route('api.v1.rooms.member.bulkUpdate', ['room' => $room]),
['users' => [$memberModerator->id], 'role' => RoomUserRole::MODERATOR]
)->assertForbidden();

//Update self as co-owner
// Update self as co-owner
$this->actingAs($memberCoOwner)->putJson(
route('api.v1.rooms.member.bulkUpdate', ['room' => $room]),
['users' => [$memberCoOwner->id], 'role' => RoomUserRole::MODERATOR]
Expand Down
Loading

0 comments on commit 67ab1c6

Please sign in to comment.