Browse Source

fix permission check for viewing map

pull/5/head
Aaron Parecki 8 years ago
parent
commit
7e1dbec110
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      compass/app/Http/Controllers/Controller.php

+ 4
- 1
compass/app/Http/Controllers/Controller.php View File

@ -78,7 +78,10 @@ class Controller extends BaseController
// Verify this user has access to the database
$db = DB::table('databases')
->where('created_by','=',session('user_id'))
->join('database_users', function($join){
$join->on('databases.id','=','database_users.database_id');
})
->where('user_id','=',session('user_id'))
->where('name','=',$name)
->first();
if(!$db)

Loading…
Cancel
Save