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

[Question] Types of users and company user #56

Open
JoaoAlem opened this issue Oct 31, 2023 · 2 comments
Open

[Question] Types of users and company user #56

JoaoAlem opened this issue Oct 31, 2023 · 2 comments

Comments

@JoaoAlem
Copy link
Contributor

JoaoAlem commented Oct 31, 2023

Hello everyone.

Context
When creating a condominium, it also creates the condominium user, the same happens for employees. But while working in companies route, i cannot find a user_type company.
I cannot find any clues in code to answer this, so i am opening this issue.

Question
Who's gonna add employees for a company?
After talking with Tomazella, we found three possibilities.

Solution

  1. Creating a flag in employees and this flag will indicate if the employee can manage the company;
  2. Creating a another user_type of Company;
  3. The condominium user is gonna add every employee of a company.

Conclusions
In terms of work load, we agreed that using the first method would be more beneficial.
The third solution, wouldn't fit well in our scenario, because the responsibility of the employees should be of the company.

@JoaoAlem JoaoAlem changed the title [Question] - Types of users and company user [Question] Types of users and company user Oct 31, 2023
@ernestoresende
Copy link
Member

The condominium is the "master user" in our scenario. The flow goes as follows:

  • A condominium is the only one that can "register" as a new user openly within the platform. How exactly this will be done at the application layer is still unclear, we'll be discussing that as we delve into the design spec for the client application @denilsonpy will be developing.

  • The condominium will be able to register companies within it's scope, and those companies will require at least one employee with administrative permissions for the company scope.

  • All employees with administrative permissions can create new users within the company scope, create departments for the company, and organize other employees within department scopes. They can also assign other employees as administrators within the company.

I agree that we should figure out how to handle the employee having administrative actions. As I see, it could be a simple boolean column in the employee table, but you might have a better idea.

@JoaoAlem
Copy link
Contributor Author

JoaoAlem commented Nov 9, 2023

From the point of view of our database schema, the most logical way to do this will be creating a new user type like: adminEmployee or company.

Because we already have the field user_type, and i think that doing this instead using a boolean will be more benefical for the future of the application than using a simple boolean.

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

No branches or pull requests

2 participants