<commit_before><?php

use Illuminate\Database\Seeder;
use App\Permission;

class PermissionTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        /*
         * Permissions we have to create

            Admin-specific
            - Approve account requests
            - Approve nominations
            - Can view all nominees.
            - Reporting features for Salvation Army/Link109

            Partner-specific
            - Receive reports
        */

        /* Admin -- Approve and Create an account */
        $approveAccount = new Permission();
        $approveAccount->name = "user-create";
        $approveAccount->display_name = "Create account requests";
        $approveAccount->description = "Create and approve user accounts.";
        $approveAccount->save();

        /* Admin -- Edit all users */
        $editAccount = new Permission();
        $editAccount->name = "user-edit";
        $editAccount->display_name = "Edit all users";
        $editAccount->save();

        /*Admin -- View all users */
        $viewUserList = new Permission();
        $viewUserList->name ="user-list";
        $viewUserList->display_name = "View user list";
        $viewUserList->save();

        /* Admin -- Approve nomination */
        $approveNomination = new Permission();
        $approveNomination->name = "nomination-approve";
        $approveNomination->display_name = "Approve Nominations";
        $approveNomination->save();

        /* Admin - view all Nominees */
        $viewNominee = New Permission();
        $viewNominee->name = "nomination-view-all";
        $viewNominee->display_name = "View All Nominees";
        $viewNominee->save();

        /* Admin and Partners -- receive reports */
        $reporting = New Permission();
        $reporting->name = "reporting";
        $reporting->display_name = "Reporting Functions";
        $reporting->description = "Reporting features for Salvation Army, etc.";
        $reporting->save();


        /*
         Nominee-specific 
         - View nomination status
         - Update Information
        */

        /* Nominee -- View own status */
        $viewOwnNominee = new Permission();
        $viewOwnNominee->name = "nomination-view-own";
        $viewOwnNominee->display_name = "View own nominees";
        $viewOwnNominee->save();

        /* Nominee -- Edit own status */
        $editOwnNomination = new Permission();
        $editOwnNomination->name = "nomination-edit-own";
        $editOwnNomination->display_name = "Edit own nomination";
        $editOwnNomination->save();


        /* 
         Nominator Status --- Still needs Updating 

         Nominator-specific
            - Can enter nominees
            - Can see list of all nominees for their school.
            - Can edit their nominee's information
            - Can see nominee status
        */

        /* Nominator -- Enter Nominee */
        $createNominee = new Permission();
        $createNominee->name = "nomination-create";
        $createNominee->display_name = "Enter Nominees";
        $createNominee->save();

        /* Nominator -- Edit Any Nominee*/
        $editNomination = new Permission();
        $editNomination->name = "nomination-edit";
        $editNomination->display_name = "Edit any Nominee";
        $editNomination->save();

        $createNomineeCMS = new Permission();
        $createNomineeCMS->name = "nomination-create-cms";
        $createNomineeCMS->display_name = "Enter Nominees from own School";
        $createNomineeCMS->save();

        $viewNomineeForSchool = new Permission();
        $viewNomineeForSchool->name = "nomination-view-cms";
        $viewNomineeForSchool->display_name = "View Nominees from own School";
        $viewNomineeForSchool->save();


        /*
         Volunteers -- May need updating
         - View shifts
         - Sign-up for shifts
        */
        /* Volunteer -- View Shifts */
        $viewShift = new Permission();
        $viewShift->name = "view-shift";
        $viewShift->display_name = "View available shifts";<commit_msg>Update permissions seeder to reflect latest batch of permissions we need outside of only using role definitions<commit_after><?php

use Illuminate\Database\Seeder;
use App\Permission;

class PermissionTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        
        /*
         * Hey you! Yes, you there! TRY and keep this docblock up to date will ya pease? O:-)

            LIST OF PERMISSIONS

            - manager-users
            - manage-nominations - In place of "add-nominations"
            - add-nominations - In place of "manage-nominations"
            - access-reports
        */

        /* Admin -- Approve and Create an account */
        $manageUsers = new Permission();
        $manageUsers->name = "manage-users";
        $manageUsers->display_name = "Manage User Accounts";
        $manageUsers->description = "Create, edit, and approve users";
        $manageUsers->save();

        $manageNominations = new Permission();
        $manageNominations->name = "manage-nominations";
        $manageNominations->display_name = "Manage All Nominations";
        $manageNominations->description = "View, create, and edit all nominations";
        $manageNominations->save();

        $addNominations = new Permission();
        $addNominations->name = "manage-users";
        $addNominations->display_name = "Add Nominations";
        $addNominations->description = "Add nominations from school";
        $addNominations->save();

        $accessReports = new Permission();
        $accessReports->name = "access-reports";
        $accessReports->display_name = "Access Reports";
        $accessReports->description = "Access reporting features";
        $accessReports->save();


        // PERMISSIONS BELOW ARE TBD.

        /*
         Volunteers -- May need updating
         - View shifts
         - Sign-up for shifts
        */
        /* Volunteer -- View Shifts */
        $viewShift = new Permission();
        $viewShift->name = "view-shift";
        $viewShift->display_name = "View available shifts";
{'fraction_non_alphanumeric': 0.11449529580609154, 'fraction_numerical': 0.0004783926008611067, 'mean_word_length': 2.1142005958291956, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '237879', 'n_tokens_mistral': 1775, 'n_tokens_neox': 1617, 'n_words': 426}