-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #163 - accept acceptance + eula
TODO: Language strings, check that the accepting user is the one that should be allowed to accept.
- Loading branch information
Showing
18 changed files
with
353 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
app/database/migrations/2015_02_25_022931_add_eula_fields.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class AddEulaFields extends Migration { | ||
|
||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
// | ||
Schema::table('settings', function ($table) { | ||
$table->longText('default_eula_text'); | ||
}); | ||
|
||
Schema::table('categories', function ($table) { | ||
$table->longText('eula_text'); | ||
$table->boolean('use_default_eula')->default(0); | ||
$table->boolean('require_acceptance')->default(0); | ||
}); | ||
|
||
Schema::table('asset_logs', function ($table) { | ||
$table->dateTime('requested_at')->nullable()->default(NULL); | ||
$table->dateTime('accepted_at')->nullable()->default(NULL); | ||
}); | ||
|
||
|
||
Schema::create('requested_assets', function ($table) { | ||
$table->increments('id'); | ||
$table->integer('asset_id')->default(NULL); | ||
$table->integer('user_id')->default(NULL); | ||
$table->dateTime('accepted_at')->nullable()->default(NULL); | ||
$table->dateTime('denied_at')->nullable()->default(NULL); | ||
$table->string('notes')->default(NULL); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
// | ||
Schema::table('settings', function ($table) { | ||
$table->dropColumn('default_eula_text'); | ||
}); | ||
|
||
Schema::table('categories', function ($table) { | ||
$table->dropColumn('eula_text'); | ||
$table->dropColumn('use_default_eula'); | ||
$table->dropColumn('require_acceptance'); | ||
}); | ||
|
||
Schema::table('asset_logs', function ($table) { | ||
$table->dropColumn('requested_at'); | ||
$table->dropColumn('accepted_at'); | ||
}); | ||
|
||
Schema::drop('requested_assets'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
return array( | ||
|
||
'id' => 'ID', | ||
'parent' => 'Parent', | ||
'title' => 'Asset Category Name', | ||
'eula_text' => 'EULA', | ||
'id' => 'ID', | ||
'parent' => 'Parent', | ||
'require_acceptance' => 'Acceptance', | ||
'title' => 'Asset Category Name', | ||
|
||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.