Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
02ed9244
Commit
02ed9244
authored
3 years ago
by
José Rômulo
Browse files
Options
Download
Email Patches
Plain Diff
Adicionando checkCoordenador
parent
968e035f
master
carl-branch
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/axios-0.21.2
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
excluir_projeto_submetido
modificacoes_aviso
updates_mar
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Http/Middleware/checkCoordenador.php
+29
-0
app/Http/Middleware/checkCoordenador.php
with
29 additions
and
0 deletions
+29
-0
app/Http/Middleware/checkCoordenador.php
0 → 100644
View file @
02ed9244
<?php
namespace
App\Http\Middleware
;
use
Auth
;
use
Closure
;
use
Illuminate\Support\Facades\Log
;
class
checkCoordenador
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public
function
handle
(
$request
,
Closure
$next
)
{
if
(
!
Auth
::
check
()){
Log
::
debug
(
'checkCoordenador'
);
return
redirect
(
'/'
);
}
if
(
Auth
::
user
()
->
tipo
==
'coordenador'
){
return
$next
(
$request
);
}
else
{
return
redirect
(
'home'
)
->
with
(
'error'
,
'Você não possui privilégios para acessa esta funcionalidade'
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help