Changeset 190db9f for app/Http


Ignore:
Timestamp:
11/01/21 11:18:15 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
master
Children:
d95fdd2
Parents:
1451c6f
Message:

edited user permissions

Location:
app/Http
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/Dashboard/DepartmentsController.php

    r1451c6f r190db9f  
    1111use App\Models\User;
    1212use App\Notifications\NewDepartmentCreated;
     13use App\Notifications\NewFolderCreated;
    1314use Carbon\Carbon;
    1415use App\Http\Controllers\Controller;
  • app/Http/Controllers/Dashboard/FoldersController.php

    r1451c6f r190db9f  
    151151
    152152        $users = User::all();
    153         Notification::send($users, new NewFolderCreated("New folder created"));
    154153
    155154        $folder->location = $location;
     
    246245        }
    247246
    248         if (auth()->user()->hasPermission("delete_all_folders")) {
     247        if (auth()->user()->hasPermission("delete_data")) {
    249248
    250249            foreach ($files as $file) {
  • app/Http/Requests/Dashboard/FolderRequest.php

    r1451c6f r190db9f  
    1919        if ($this->isMethod("patch")) {
    2020            $folder = Folder::find($this->route("id"));
    21             return auth()->user()->hasPermission("edit_all_folders") || ($folder->user->id == auth()->user()->id);
     21            return auth()->user()->hasPermission("manage_all_folders") || ($folder->user->id == auth()->user()->id);
    2222        }
    2323
Note: See TracChangeset for help on using the changeset viewer.