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

fix: Consertar fluxo para tornar usuário juiz/moderador #18

Open
Tracked by #8
joaovitorsl opened this issue Sep 8, 2024 · 0 comments
Open
Tracked by #8

fix: Consertar fluxo para tornar usuário juiz/moderador #18

joaovitorsl opened this issue Sep 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@joaovitorsl
Copy link
Member

joaovitorsl commented Sep 8, 2024

Descrição

Atualmente isso se dá APENAS na hora da criação do usuário, se o email logado no Google estiver listado no if (email.equals("...")), este tem poder de julgar. Fora isso, não dá pra fazê-lo pela interface.

public Usuario(String nome, int idade, String nomeInstituicao, String cargo, String cidade, String email, boolean ativo) {
		this.nome = nome;
		this.idade = idade;
		this.nomeInstituicao = nomeInstituicao;
		this.cargo = cargo;
		this.cidade = cidade;
		this.email = email;
		this.ativo = ativo;
		this.permissoes = new ArrayList<>();
		if (email.equals("[email protected]") || email.equals("[email protected]")) {
			permissoes.add(PermissaoType.ADMIN);
			permissoes.add(PermissaoType.JUDGE);
		}
		this.cursoAvaliacao = new ArrayList<>();
		this.cursoCriacao = new ArrayList<>();

	}
@joaovitorsl joaovitorsl added the enhancement New feature or request label Sep 8, 2024
@joaovitorsl joaovitorsl added this to the Melhorias de fluxo milestone Sep 8, 2024
@joaovitorsl joaovitorsl changed the title Consertar fluxo para tornar usuário juiz/moderador fix: Consertar fluxo para tornar usuário juiz/moderador Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant