Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
05df04d
📦 NEW: Add Permissions DB and UI
taija Nov 17, 2025
702dfbb
👌 IMPROVE: Upgrade Bootstrap to 5.3.x
taija Nov 17, 2025
b100df0
🐛 FIX: Error on Delete
taija Nov 18, 2025
dbd8d1f
📦 NEW: Interface for Updating Clients
taija Nov 18, 2025
f36594c
👌 IMPROVE: Backtrack and Rewrite Permissions Structure
taija Nov 18, 2025
cb32f5e
📦 NEW: Confirm Before Deleting
taija Nov 18, 2025
cda58dd
👌 IMPROVE: Add Gates to All Protected Endpoints
taija Nov 18, 2025
9c6516b
📦 NEW: Cache and Sessions in DB
taija Nov 18, 2025
67552cb
🐛 FIX: Sessions and Cache Table Migrations
taija Nov 18, 2025
8d140e5
🐛 FIX: Removing Permissions When No Boxes Checked
taija Nov 18, 2025
da533ae
📦 NEW: Remove L5 Swagger Docs
taija Nov 20, 2025
ad14638
👌 IMPROVE: More L5 Cleanup
taija Nov 20, 2025
b87c971
👌 IMPROVE: Ensure Authentication Endpoints Document Properly
taija Nov 20, 2025
559d22d
👌 IMPROVE: Student Endpoint to use Resource instead of Transformer
taija Nov 20, 2025
d8f3205
🐛 FIX: Primary Key in Employee Directory Model
taija Nov 20, 2025
c07ecba
📦 NEW: Add and Configure Scramble
taija Nov 20, 2025
89845d5
👌 IMPROVE: Employee Endpoint to use Resource instead of Transformer
taija Nov 20, 2025
b26242f
👌 IMPROVE: Employee Controller to use Resource and Collection
taija Nov 21, 2025
496cda0
👌 IMPROVE: Convert Subject to use Resource
taija Nov 21, 2025
8919ed9
👌 IMPROVE: Convert YearQuarter to Resource
taija Nov 21, 2025
e5f6e25
👌 IMPROVE: Move CourseYearQuarter to use Resource
taija Nov 21, 2025
29c9e34
👌 IMPROVE: Course Controller to use Resources
taija Nov 21, 2025
c060fd0
👌 IMPROVE: ClassSchedule to use Resource and Collection
taija Nov 21, 2025
0538523
👌 IMPROVE: Convert LinkFound to use Resource
taija Nov 21, 2025
03564f0
👌 IMPROVE: Remove Fractal (no longer used)
taija Nov 21, 2025
c862946
👌 IMPROVE: Clean Up Unused Endpoints
taija Nov 24, 2025
9da08b5
👌 IMPROVE: Active Quarter Logic
taija Nov 24, 2025
d22b251
📦 NEW: Base Azure OIDC SSO Config Using Socialite
taija Dec 17, 2025
073e224
👌 IMPROVE: Add Azure ID Column to Users Table
taija Dec 19, 2025
bbde403
👌 IMPROVE: Add Local HTTPS Support to Sail
taija Dec 19, 2025
0c78114
👌 IMPROVE: Finalize Azure Setup
taija Dec 19, 2025
6086bfe
📖 DOC: Add Azure Config to Docs
taija Dec 19, 2025
5877ad2
👌 IMPROVE: Update Laravel to v12
taija Dec 19, 2025
fa83a24
👌 IMPROVE: Make Scramble Docs Public
taija Dec 19, 2025
cded0ca
📖 DOC: Add Scramble Endpoint to Readme
taija Dec 19, 2025
ee75e1f
Merge pull request #37 from BellevueCollege/add-azure-sso
taija Jan 5, 2026
563fa08
Merge branch 'add-permissions-system' into add-scramble
taija Jan 5, 2026
8694a3f
Merge pull request #38 from BellevueCollege/add-scramble
taija Jan 6, 2026
1967b03
🐛 FIX: URL Generation for Named Routes in Subfolder Deployment
taija Jan 8, 2026
5bcb9f2
📦 NEW: Add AzureID and UPN to Student and Employee Endpoints
taija Nov 20, 2025
e274ed1
👌 IMPROVE: Allow UPN To Search Employees and Students
taija Jan 13, 2026
dad3302
Merge pull request #39 from BellevueCollege/domain-split-prep
taija Jan 13, 2026
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
1 change: 1 addition & 0 deletions .composer/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deny from all
1 change: 1 addition & 0 deletions .composer/cache/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deny from all
17 changes: 5 additions & 12 deletions .env.azuredevops
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ COPILOT_DB_DATABASE=#{copilot.database}#
# connection info for PCI Forms db connection
PCIFORMS_DB_DATABASE=#{pciforms.database}#

# Azure Entra ID Credentials
AZURE_CLIENT_ID=#{azure.client.id}#
AZURE_CLIENT_SECRET=#{azure.client.secret}#
AZURE_TENANT_ID=#{azure.tenant.id}#
AZURE_REDIRECT_URI=#{azure.redirect.uri}#

BROADCAST_DRIVER=#{broadcast.driver}#
CACHE_DRIVER=#{cache.driver}#
Expand Down Expand Up @@ -59,18 +64,6 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

JWT_SECRET=#{jwt.secret}#

# Config for ADLDAP authentication
ADLDAP_CONTROLLERS=#{adldap.controllers}#
ADLDAP_BASEDN=#{adldap.basedn}#
ADLDAP_PORT=#{adldap.port}#
ADLDAP_ADMIN_USERNAME="#{adldap.username}#"
ADLDAP_ADMIN_PASSWORD="#{adldap.password}#"
ADLDAP_USE_SSL=#{adldap.useSSL}#
ADLDAP_USE_TLS=#{adldap.useTLS}#

# Complete distinguished name of group to which to limit admin dashboard access
ADMIN_GROUP="#{admin.group}#"

# Client id/key used for test cases
TEST_CLIENTID=
TEST_CLIENTKEY=
Expand Down
18 changes: 6 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ COPILOT_DB_DATABASE=
COPILOT_DB_USERNAME=
COPILOT_DB_PASSWORD=

# Azure Entra ID Credentials
AZURE_CLIENT_ID=
AZURE_CLIENT_SECRET=
AZURE_TENANT_ID=
AZURE_REDIRECT_URI=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
Expand Down Expand Up @@ -91,18 +97,6 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

JWT_SECRET=

# Config for ADLDAP authentication
ADLDAP_CONTROLLERS=
ADLDAP_BASEDN=
ADLDAP_PORT=636
ADLDAP_ADMIN_USERNAME=
ADLDAP_ADMIN_PASSWORD=
ADLDAP_USE_SSL=true
ADLDAP_USE_TLS=false

# Complete distinguished name of group to which to limit admin dashboard access
ADMIN_GROUP=

# Client id/key used for test cases
TEST_CLIENTID=
TEST_CLIENTKEY=
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ yarn-error.log
.env
.DS_Store
/storage/api-docs
/docker/nginx/ssl
Binary file modified app/Http/.DS_Store
Binary file not shown.
80 changes: 75 additions & 5 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
use Illuminate\Support\Facades\Hash;
use App\Models\Client;



class AdminController extends Controller
{
public function __construct()
Expand All @@ -18,6 +20,7 @@ public function __construct()
public function index()
{
$client_data = Client::all();
//dd($client_data);
return view('admin.index', ['data' => $client_data ]);
}

Expand Down Expand Up @@ -57,7 +60,7 @@ public function deleteClient($id){
//delete client
try {
Client::destroy($id);
Log::info(sprintf("Client %d deleted by %s.", $id, Auth::user()->getUserPrincipalName()));
Log::info(sprintf("Client %d deleted", $id));
} catch ( \Exception $e ) {
Log::error($e->getMessage());
return redirect()->back()->withError("There was an error while deleting the client.");
Expand All @@ -67,7 +70,9 @@ public function deleteClient($id){
}

public function addClientShow() {
return view('admin.addclient');
// Get available permissions
$permissions = config('permissions');
return view('admin.addclient', compact('permissions'));
}

public function addClientPost(Request $request) {
Expand All @@ -77,7 +82,7 @@ public function addClientPost(Request $request) {
'clienturl' => 'required'
]);

$form_input = $request->only('clientname', 'clienturl');
$form_input = $request->only('clientname', 'clienturl', 'permissions');

$new_clientkey = Client::generateClientKey();

Expand All @@ -86,9 +91,17 @@ public function addClientPost(Request $request) {
$newclient->clienturl = $form_input['clienturl'];
$newclient->clientid = Client::generateClientID();
$newclient->password = Hash::make($new_clientkey);
$newclient->created_by = Auth::id();

try {
$newclient->save();

// Sync permissions after the client is saved
if (isset($form_input['permissions'])) {
$newclient->syncPermissionsByName($form_input['permissions']);
} else {
$newclient->syncPermissionsByName([]);
}
}
catch ( \Exception $e ) {
return redirect()->back()->withError("There was an error while adding the client.");
Expand All @@ -97,6 +110,63 @@ public function addClientPost(Request $request) {
return view('admin.addclient')->with('success', true)
->with('clientname', $newclient->clientname)
->with('clientid', $newclient->clientid)
->with('clientkey', $new_clientkey);
->with('clientkey', $new_clientkey)
->with('set_permissions', $form_input['permissions'] ?? []);
}

/**
* Edit an existing client
*
* @param Request $request
* @param int $id
* @return \Illuminate\View\View
*/
public function updateClient(Request $request, $id)
{
// Get available permissions
$permissions = config('permissions');

// Get the client to edit
$client = Client::findOrFail($id);

return view('admin.updateclient', compact('client', 'permissions'));
}

public function updateClientPut(Request $request, $id)
{
$this->validate($request, [
'clientname' => 'required',
'clienturl' => 'required|url'
]);

$form_input = $request->only('clientname', 'clienturl', 'permissions');

try {
// Find the existing client
$client = Client::findOrFail($id);

// Update client details
$client->clientname = $form_input['clientname'];
$client->clienturl = $form_input['clienturl'];
$client->save();

// Sync permissions
if (isset($form_input['permissions'])) {
$client->syncPermissionsByName($form_input['permissions']);
} else {
$client->syncPermissionsByName([]);
}

return redirect()
->route('admin.client.update', ['id' => $id])
->with('success', 'Client updated successfully.');

} catch (\Exception $e) {
Log::error('Error updating client: ' . $e->getMessage());
return redirect()
->back()
->withInput()
->withError('There was an error while updating the client.');
}
}
}
}
Loading