Skip to content

tulsaschoolsdata/snipe-it-customizations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snipe-IT Customizations for Tulsa Public Schools

The Customizations

This library extends a Snipe-IT application in the following ways:

Restore a Backup

Adds a new artisan commmand snipeit:backup-restore. This corresponds to the existing snipeit:backup command.

See the Override Hacks section about overriding config/backup.php and config/filesystems.php.

$ php artisan snipeit:backup-restore

 Choose a backup [Snipe-IT]:
  [0] Snipe-IT
 >

 Choose a version [snipe-it-2020-07-07-18-15-38.zip]:
  [0] snipe-it-2020-07-07-18-15-38.zip
  [1] snipe-it-2020-07-02-09-58-47.zip
  [2] snipe-it-2020-06-23-18-18-22.zip
  [3] snipe-it-2020-06-23-14-23-11.zip
 >

Loading backup: Snipe-IT/snipe-it-2020-07-07-18-15-38.zip
Restoring:
- db-dumps/mysql-snipeit.sql
- var/www/html/storage/oauth-private.key
- var/www/html/storage/oauth-public.key
- ...
- var/www/html/config/mail.php
- var/www/html/config/trustedproxy.php

Authenticate with Microsoft Graph

Enables registering and logging in with TPS’ Microsoft tenant through the Graph API. Leverages the Microsoft Graph Socialite Provider for the integration.

Visit http://localhost:3051/login/graph to login.

TODO: Customize the login page with a Login with Microsoft button or link.

Environment Variables

Several environment variables are required to function correctly.

  • BACKUPS_AWS_KEY: Standard AWS_ACCESS_KEY_ID
  • BACKUPS_AWS_SECRET: Standard AWS_SECRET_ACCESS_KEY
  • BACKUPS_AWS_REGION: AWS Region
  • BACKUPS_AWS_BUCKET: AWS Bucket
  • BACKUPS_AWS_PREFIX: Optional path prefix within bucket
  • BACKUPS_AWS_URL: Optional endpoint for using AWS alternatives like Minio
  • GRAPH_KEY: Application (client) ID or Application ID URI
    • example: https://tulsaschools.onmicrosoft.com/snipe-it
  • GRAPH_SECRET: Client secret for the registered app
  • GRAPH_REDIRECT_URI: Redirect URI for the registered app
    • example: http://localhost:3051/login/graph/callback
  • GRAPH_TENANT_ID: Directory (tenant) ID
    • example: tulsaschools.onmicrosoft.com

Override Hacks

It’s not possible to merge config values over existing values defined in the application’s config. So we resort to tracking our own copy and clobbering the originals.

$ composer require tulsaschoolsdata/snipe-it-customizations:dev-master
$ cp vendor/tulsaschoolsdata/snipe-it-customizations/src/config/backup.php config/backup.php
$ cp vendor/tulsaschoolsdata/snipe-it-customizations/src/config/filesystems.php config/filesystems.php

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages