-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task#174 [542 - Gerenciar permissões de acesso] - Atribuir/Negar acesso ao usuário - Parte 1 #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisar uses das models.
Ou usar alias, ou usar o nome da classe mesmo
app/Controller/MemberController.php
Outdated
public function create(): Psr7ResponseInterface | ||
{ | ||
$data = $this->request->getParsedBody(); | ||
$member = new MemberModel(); | ||
$member = new Member(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dá uma olhada aqui, pois a importação está com alias na linha 15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blz entendi.
app/Controller/MemberController.php
Outdated
} | ||
|
||
|
||
$member = Member::where(['squad_uuid' => $uuid, 'uuid' => $memberUuid])->first(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisar uses das models
app/Controller/MemberController.php
Outdated
} | ||
|
||
|
||
$member = Member::where(['uuid' => $memberUuid])->first(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisar uses das models
@lthurler fiz o review em uma outra conta minha hehe |
…ão estavam sendo retornados no UserController
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisar validação das permissões do create do MemberController e padronizar, se possível, nome da função delete nos controllers.
return $this->response->json($members); | ||
} | ||
|
||
|
||
public function create(): Psr7ResponseInterface | ||
{ | ||
$data = $this->request->getParsedBody(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Não tem permissão para create?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tem sim, em criar a squad... futuquei aqui e vi que tem criar membro quando cria a squad. Papei essa mosca rs
renomeados os controllers:
Product para ProductController e Member para MemberController e feita as devidas modificação nas rotas para apontarem para o novo nome
alterados os metodos: Product@create, Product@show, SquadController@create, SquadController@show, MemberController@index,
MemberController@update, MemberController@delete para verificação das permissões na task