Skip to content
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

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

lthurler
Copy link

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

@lthurler lthurler self-assigned this Jul 26, 2024
@lthurler lthurler marked this pull request as ready for review July 27, 2024 01:45
Copy link

@lucasbussola lucasbussola left a 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

public function create(): Psr7ResponseInterface
{
$data = $this->request->getParsedBody();
$member = new MemberModel();
$member = new Member();

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blz entendi.

}


$member = Member::where(['squad_uuid' => $uuid, 'uuid' => $memberUuid])->first();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisar uses das models

}


$member = Member::where(['uuid' => $memberUuid])->first();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisar uses das models

@rigonlucas
Copy link

@lthurler fiz o review em uma outra conta minha hehe
Pode considerar os comentários

…ão estavam sendo retornados no UserController
Copy link

@Marcosh22 Marcosh22 left a 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();

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?

Copy link
Author

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

app/Controller/UserController.php Outdated Show resolved Hide resolved
@lthurler lthurler merged commit 00f6aee into SouJunior:develop Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants