Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions app/Http/Controllers/Api/V1/SuborganizationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ public function uploadFavicon(SuborganizationUploadFaviconRequest $suborganizati
* @bodyParam msteam_secret_id uuid Secret id Example: 123e4567-e89b-12d3-a456-426614174000
* @bodyParam msteam_tenant_id uuid Tenant id Example: 123e4567-e89b-12d3-a456-426614174000
* @bodyParam msteam_secret_id_expiry date Secret expiry date Example: 2022-09-29
* @bodyParam msteam_project_visibility bool Enable/disable google classroom Example: false
* @bodyParam msteam_playlist_visibility bool Enable/disable google classroom Example: false
* @bodyParam msteam_activity_visibility bool Enable/disable google classroom Example: false
*
* @responseFile 201 responses/organization/suborganization.json
*
Expand Down Expand Up @@ -275,6 +278,9 @@ public function show(Organization $suborganization)
* @bodyParam msteam_secret_id uuid Secret id Example: 123e4567-e89b-12d3-a456-426614174000
* @bodyParam msteam_tenant_id uuid Tenant id Example: 123e4567-e89b-12d3-a456-426614174000
* @bodyParam msteam_secret_id_expiry date Secret expiry date Example: 2022-09-29
* @bodyParam msteam_project_visibility bool Enable/disable google classroom Example: false
* @bodyParam msteam_playlist_visibility bool Enable/disable google classroom Example: false
* @bodyParam msteam_activity_visibility bool Enable/disable google classroom Example: false
*
* @responseFile responses/organization/suborganization.json
*
Expand Down
3 changes: 3 additions & 0 deletions app/Http/Requests/V1/SuborganizationSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public function rules()
'msteam_secret_id' => 'uuid|nullable|max:255',
'msteam_tenant_id' => 'uuid|nullable|max:255',
'msteam_secret_id_expiry' => 'date|nullable',
'msteam_project_visibility' => 'boolean',
'msteam_playlist_visibility' => 'boolean',
'msteam_activity_visibility' => 'boolean',
];
}

Expand Down
3 changes: 3 additions & 0 deletions app/Http/Requests/V1/SuborganizationUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public function rules()
'msteam_secret_id' => 'uuid|nullable|max:255',
'msteam_tenant_id' => 'uuid|nullable|max:255',
'msteam_secret_id_expiry' => 'date|nullable',
'msteam_project_visibility' => 'boolean',
'msteam_playlist_visibility' => 'boolean',
'msteam_activity_visibility' => 'boolean',
];
}

Expand Down
5 changes: 4 additions & 1 deletion app/Http/Resources/V1/OrganizationResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public function toArray($request)
'msteam_client_id' => $this->msteam_client_id,
'msteam_secret_id' => $this->msteam_secret_id,
'msteam_tenant_id' => $this->msteam_tenant_id,
'msteam_secret_id_expiry' => $this->msteam_secret_id_expiry
'msteam_secret_id_expiry' => $this->msteam_secret_id_expiry,
'msteam_project_visibility' => $this->gcr_project_visibility,
'msteam_playlist_visibility' => $this->gcr_playlist_visibility,
'msteam_activity_visibility' => $this->gcr_activity_visibility
];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddMsTeamVisibilityFieldsToOrganizationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('organizations', function (Blueprint $table) {
$table->boolean('msteam_project_visibility')->nullable()->default(true);
$table->boolean('msteam_playlist_visibility')->nullable()->default(false);
$table->boolean('msteam_activity_visibility')->nullable()->default(false);
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('organizations', function (Blueprint $table) {
$table->dropColumn(['msteam_project_visibility', 'msteam_playlist_visibility', 'msteam_activity_visibility']);
});
}
}
5 changes: 4 additions & 1 deletion storage/responses/organization/suborganization.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"msteam_client_id" : null,
"msteam_secret_id" : null,
"msteam_tenant_id" : null,
"msteam_secret_id_expiry": null
"msteam_secret_id_expiry": null,
"msteam_project_visibility": true,
"msteam_playlist_visibility": false,
"msteam_activity_visibility": false
}
}